pchuang@cn.ibm.com
1.Preparation
(1) Logon to the Server as root.
(2) Open a terminal, check if there is the script named tarbackup.sh in /usr/local/bin directory
(3) Make sure you know the instance name you want to backup in TDS ("instance" hereinafter called for short ) and the location the backup file will be put ("path" hereinafter called for short ).
2.Do the backup operation
(1)Run the script
$/usr/local/bin/tarbackup.sh instance path
E.g.: /usr/local/bin/tarbackup.sh idsinst /opt/backup
The script will mainly do three operations below:
1)Stop the instance.
Backup the instance(/opt/ibm/ldap/V6.1/sbin/idsdbback)
Tar the backupfile and move it to the directory specified
4)Start the instance.
So you have to confirm that each operation has been executed correctly.The script will give you the opportunity to do this and Please notice the hints the script tells you, It's helpful.When It prints out"Done,Bye", the whole process of backup is finished.
Restore the TDS backup
Make sure you know the instance name you want to backup in TDS ("instance" hereinafter called for short ) and the location the backup file has be put ("path" hereinafter called for short ) and the archive filename of the backup("name" hereinafter called for short )
Run the script
$/usr/local/bin/untarbackup.sh instance path name
E.g.:
/usr/local/bin/untarbackup.sh idsinst /opt/backup 2009_Mar_26.tar.gz
The script will mainly do three operations below:
1)Stop the instance.
2)Untar the backup archive.
3)Restore the instance(/opt/ibm/ldap/V6.1/sbin/idsdbrestore)
4)Start the instance.
So you have to confirm that each operation has been executed correctly.The script will give you the opportunity to do this and Please notice the hints the script tells you, It's helpful.When It prints out"Done,Bye", the whole process of restore is finished.
tarbackup.sh:
#!/bin/bash
yes_or_no()
{
while true
do
echo -ne "\33[36m"
echo "Please check if the instance you want to $1 has been already done correctly(y/n):"
echo -ne "\e[0m"
echo -ne "\33[31m"
echo "Hints:If this requirement (or message) \"$2\" meets(or printed) ,It's done correctly!"
echo -ne "\e[0m"
read -s -n 1 confirm
case $confirm in
Y|y)return 0;;
N|n)echo "Error happened ,Exit!";exit 1;;
* )echo "Please enter Y/y or N/n";echo -e "\n";;
esac
done
}
INSTANCE=$1
backup_path=$2
time_info=`date "+%Y_%b_%d"`
if [ ! -d "/backup" ];then
mkdir /backup
chmod 777 /backup
fi
echo -ne "\33[36m"
echo "Please Wait..."
echo -ne "\e[0m"
/opt/ibm/ldap/V6.1/sbin/ibmslapd -I $INSTANCE -k
yes_or_no "stop" "Terminated direcrory server instance XXX normally"
echo -ne "\33[36m"
echo "Please Wait..."
echo -ne "\e[0m"
/opt/ibm/ldap/V6.1/sbin/idsdbback -I $INSTANCE -b /backup/tdsbackup -k /backup/
tar -czf "$time_info".tar.gz /backup >/dev/null 2&>1
mv "$time_info".tar.gz $backup_path
ls -lh $backup_path/"$time_info".tar.gz
yes_or_no "Backup" "if the size tar.gz file is greater than 3M it's correct"
/opt/ibm/ldap/V6.1/sbin/ibmslapd -I $INSTANCE
yes_or_no "Start" "Server starting"
rm -f /backup/*
echo "Done,Bye!"
untarbackup.sh:
#!/bin/bash
yes_or_no()
{
while true
do
echo -ne "\33[36m"
echo "Please check if the instance you want to $1 has been already done correctly(y/n):"
echo -ne "\e[0m"
echo -ne "\33[31m"
echo "Hints:If this requirement (or message) \"$2\" meets(or printed) ,It's done correctly!"
echo -ne "\e[0m"
read -s -n 1 confirm
case $confirm in
Y|y)return 0;;
N|n)echo "Error happened ,Exit!";exit 1;;
* )echo "Please enter Y/y or N/n";echo -e "\n";;
esac
done
}
INSTANCE=$1
backup_path=$2
time_info=`date "+%Y_%b_%d"`
file=$3
echo -ne "\33[36m"
echo "Please Wait..."
echo -ne "\e[0m"
/opt/ibm/ldap/V6.1/sbin/ibmslapd -I $INSTANCE -k
yes_or_no "stop" "Terminated direcrory server instance XXX normally"
tar zxvf "$backup_path"/"$file" -C $backup_path #>/dev/null 2&>1
echo -ne "\33[36m"
echo "Please Wait..."
echo -ne "\e[0m"
/opt/ibm/ldap/V6.1/sbin/idsdbrestore -I $INSTANCE -k $backup_path/backup/
yes_or_no "Restore" "From the message We can know that A lot of items have been restored"
/opt/ibm/ldap/V6.1/sbin/ibmslapd -I $INSTANCE
yes_or_no "Start" "Server starting"
rm -rf $backup_path/backup/
echo "Done,Bye!"
分享到:
相关推荐
Dropbox works the way you do Get to all your files from anywhere, on any device, and share them with anyone. Take your docs anywhereSave files on your computer, then access them on your phone from ...
在"标题"中提到的"Bmap-offline_vue的api.js资源"是这个项目的核心,它应该是对百度地图API进行了调整,以适应Vue.js的应用场景,可能包括对Bmap的API进行封装,使其能更好地与Vue组件协同工作。这个api.js文件可能...
To enable the application, remove the app_offline.htm file from the application root directory.” 这个问题对于许多开发者来说可能非常困扰,但了解其背后的原理及解决方法之后,其实并不复杂。 #### 一、...
标题"htmlifier-offline.zip"暗示了解决这一问题的一种方法:使用HTMLifier-offline工具将Scratch3项目转换为HTML文件。这个工具允许用户将他们的Scratch3程序在Web浏览器中运行,弥补了Scratch3无法生成本地可执行...
Android studio离线组件最新版本的 Google Maven 依赖项offline-gmaven-stable,文件分割成 三个 压缩包,必须集齐 三个 文件后才能一起解压一起使用: Android studio离线组件offline-gmaven-stable.part1.rar ...
sys.dbms_backup_restore.restoreBackupPiece(done=>done,handle=>'/opt/oracle/flash_recovery_area/ORCL/backupset/2008_07_18/o1_mf_ncsnf_TAG20080718T203240_482fls2h_.bkp',params=>null); sys.dbms_backup_...
java基础知识及常用框架springboot\ssm\前端知识查阅手册及项目实战总结,也可自行下载 下载地址https://how2j.cn/k/offline/offline-offline/893.html?p=31136
Android studio离线组件最新版本的 Google Maven 依赖项offline-gmaven-stable,文件分割成 三个 压缩包,必须集齐 三个 文件后才能一起解压一起使用: Android studio离线组件offline-gmaven-stable.part1.rar ...
MeterSphere 是一站式开源持续测试平台,覆盖测试管理...metersphere-offline-installer-v1.19.1-arm64文件分割成三个压缩包,必须凑齐三个才能解压缩使用: metersphere-offline-installer-v1.19.1-arm64.part1.rar ...
Android studio离线组件最新版本的 Google Maven 依赖项offline-gmaven-stable,文件分割成 三个 压缩包,必须集齐 三个 文件后才能一起解压一起使用: Android studio离线组件offline-gmaven-stable.part1.rar ...
- 基础包下载地址:`http://127.0.0.1/TDS/data/files/p3/s15/G6227/g1750/v513419/f1/full/update_full_base.zip` - **步骤5:调整HiSuite Proxy设置**:在进行刷机操作时,需要将HiSuite Proxy中的固件地址从...
标题“ie11_offline”指的是Internet Explorer 11的离线安装包,这是一款由微软公司开发的网络浏览器的特定版本。Internet Explorer 11(简称IE11)是IE浏览器系列的最后一个版本,发布于2013年,主要用于Windows 7...
Setup Type: Offline Installer / Full Standalone Setup Compatibility Architecture: 32 Bit (x86) / 64 Bit (x64) Latest Version Release Added On: 11th Mar 2016 Operating System: Windows XP/Vista/7/8/...
opencv-3.4.4-android-sdk/apk opencv-3.4.4-android-sdk/LICENSE opencv-3.4.4-android-sdk/README.android opencv-3.4.4-android-sdk/samples
AI2 Offline Companion.apk
Java中的正则表达式是一种强大的文本处理工具,用于查找、替换和解析字符串。它们通过一套预定义的规则来描述要匹配的模式,这些规则由特殊字符和普通字符组成。正则表达式在Java中主要通过java.util.regex包提供的...
It allows you to capture the game view to a multi-channel OpenEXR or multiple PNG files, supporting not just the final output image, but also some common elements, like depth, per-light shadows, ...
【标题】"DriverPack Offline 数据包" 【描述】"fhbngbejdkgjnfndbgnghn" 这段描述看似随机的字符组合,无法直接解析出具体的信息,但我们可以推测它可能是某种加密或者混淆后的信息,通常在安全传输或隐藏数据时会...
离线浏览器Portable Offline Browser是一款专为用户在无网络环境下访问网站设计的软件工具。它允许用户将整个网站或其中特定部分下载到本地计算机上,以便在没有互联网连接时也能浏览内容。这款国外开发的优秀离线...