SEP Sesam Server Linux BSR Restore EN
From SEPsesam
Introduction
There are different ways to restore a SEP sesam server Linux. This examples shows a disaster recovery of the SEP sesam server itself by using the SEP BSR disc. It is called BSR desaster restore of the Sesam server itself (Bare Metal Recovery by using SEP Linux BSR CD). This example describes the scenario of the Sesam server on SLES10 32-bit had a hard disk crash. Important are the following prerequisites.
Prerequisites
- There have to be 3 separate valid backups on a physical tape:
- a full or copy path backup of the Sesam server (source all)
- a partition info backup (source disk_info)
- a Sesam self backup (task SESAM_BACKUP with source /var/opt/sesam/var, is <SESAM_VAR>). Please check that the LIS-files (<SESAM_VAR>/lis) are included in the backup task.
- For the recovery you will need structurally indentical hardware. A recover to new or changed hardware will not supported, yet. Respectively for the use of another hardware a profound knowledge of the operating system and partitioning of hard disks are necessary.
- A valid license for BSR Linux. Contact sales@sep.de for pricing.
- The BSR disc ([| SEP Sesam BSR ISO image]) for your hardware (32- or 64-bit)
- Well grounded in Linux shell handling.
- It would be an asset to have knowledge in SEP sesam interface basics and the sm_recover in particular.
Procedure
Recover steps
The recover will happen in the following steps:
- Boot from the SEP sesam BSR live CD
- Start the SEP sesam server from the live CD
- Check the Sesam configuration
- Start one or more root shells
- Check if the right medium is inserted in the tape drive
- Restore the partition information into the file system
- Apply the partition information
- Restore the all' backup
- Restore the SESAM_BACKUP
- Install the boot loader
- Reboot the recovered system
Boot from the SEP sesam BSR live CD
Connect the tape drive onto the failover system and insert the boot disc. During the boot process the prompt ENTER to boot: appears. Therefore press <Enter> to boot the system. After the boot process appears the network configuration dialog. Here yo can choose DHCP or Manually. Select the right one depending on your network environment.
Start the SEP sesam server from the live CD
The SEP sesam server installation process will started by the desktop icon SEP sesam Server Setup.
After the installation the Sesam GUI starts automatically.
Check the Sesam configuration
It is very important for a successful restore that the tape hardware has been connected and the Sesam has recognized the tape drive correctly. Please check wheather the configuration is properly.
Check by Sesam GUI
Start one or more root shells
When the tape drive is configured porperly and all Sesam SMS structures will created you can start a root shell by the "Root Shell" icon. The Sesam environment will be loaded a new root shell automatically.
| Hint |
|
The work with more than one root shell is recommended bcs. in one shell you can run the sm_recover once to restore all necessary savesets and execute additional commands in another shell window. The sm_recover can lasts several hours depending on the tape media type it has to read and the count of savesets on the medium. |
Either the Sesam GUI can keep opened or can be closed. For the next steps the Sesam GUI is not needed.
Switch the Sesam language to english
Unfortunately, at the moment the SEP Sesam server starts in german language and all tools communcate in german. To switch the language to "english" execute the following steps:
1. Open a root shell
2. Go into the ini directory of the Sesam installation (the Sesam environment should be set)
cd ini
3. Open the config file sm.ini with the editor
4. Set the value lang=en in the section [SETUP] and save the changes
5. Restart the Sesam server
sm_main restart
Now operates the Sesam server in english.
Check if the right medium is inserted in the tape drive
Now we check both can I access to the tape drive and is the right label on the tape:
root@recover:~# sm_sms_interface getlabel -d /dev/nst0 STATUS=SUCCESS MSG="Tapelabel = HGB00002,TapeID = 2.000000,Tapeinfo = SESAM-volume, BlockSize = 65536, Creation Date = 2010-01-21 16:31:56"
If the label which has been read is correct we can start the restores. If not check the hardware and the drive configuration.
Start the sm_recover process
First we restore the partition information into the Live-CD RAM disk. Start the sm_recover command in the root shell. To begin the program ask some questions:
- what device should be used?
- Should the Sesam scheduler locked during the rescover process?
- The next question asked if you know saveset ID and segment number of a particular saveset to restore. If the answer is No the entire medium will read from start of the tape until the last saveset. In this case all recognized savesets will listet.
This procedure can lasts several time. In our example we need the last 3 savesets (no 5-7).
root@recover:~# sm_recover
num device name typ
1 disk1 Drive-1 DISK_HARD
2 /dev/nst0 Drive-2-LTO LTO
Enter drive number, (r) to repeat list, (q) to quit: 2
Analyse a media: restore data or listings of save sets
Restoring data while SEPsesam is active may cause conflicts
due to concurrently running activities on the drive.
If you're sure, that there are no activities scheduled during
recover, you don't neeed to block SEPsesam
Blocking SEPsesam during recover prevents execution of activities
scheduled for the other drives too.
Do you want to block SEPsesam ? (y|n] > y
wait until SEPuler - the timecontrol of SEPsesam - finishes its current work ...
SEPuler is blocked ...
Do you wish to enter label, save set name and segment number directly ( no searching on media ) (y/n) > n
now tape will be rewinded and scanned until end ...
MSG="Tapelabel = HGB00002,TapeID = 2.000000,Tapeinfo = SESAM-volume, BlockSize = 65536, Creation Date = 2010-01-21 16:31:56"
Tape ID = 2
No. FM = 1
1 : Task: smrh5_etc, Client: smrh5,
Source: /etc,
Save set: SF20100121181753, Segment: 1
Tape ID = 2
No. FM = 2
2 : Task: lxhg00_etc, Client: lxhg00,
Source: /etc,
Save set: SF20100121182227, Segment: 2
Tape ID = 2
No. FM = 3
3 : Task: lxhg00_srv-data, Client: lxhg00,
Source: /srv/data,
Save set: SF20100121182501, Segment: 3
...
...
5 : Task: smhg00_all, Client: smhg00,
Source: all,
Save set: SF20100126142353, Segment: 111
Filemark = 112
Filemark = 113
Filemark = 114
Filemark = 115
Filemark = 116
Filemark = 117
Tape ID = 2
No. FM = 118
6 : Task: smhg00_diskinfo, Client: smhg00,
Source: disk_info,
Save set: SF20100126150650, Segment: 118
Tape ID = 2
No. FM = 119
7 : Task: SESAM_BACKUP, Client: smhg00,
Source: /var/opt/sesam/var,
Save set: SF20100126151008, Segment: 119
Filemark = 120
Filemark = 121
Tapelabel=HGB00002, TapeID=2, Tapeinfo=tti, BlockSize=, Creation Date=, NextTape=, EOMFlag=
there are 7 save sets on the media
I001-RECOVER General tape data
I002-RECOVER Label : HGB00002
I003-RECOVER Creation date : 2010-01-21 16:31:56
I004-RECOVER Header info : SESAM-volume,
I005-RECOVER Blocksize :
I006-RECOVER Info :
I007-RECOVER Last write :
I008-RECOVER Split save sets:
I009-RECOVER Next label :
Listing of save sets
1 SF20100121181753 Task: smrh5_etc, Source: /etc
2 SF20100121182227 Task: lxhg00_etc, Source: /etc
3 SF20100121182501 Task: lxhg00_srv-data, Source: /srv/data
4 SF20100122100013 Task: lxhg00_mnt-easyhgrams, Source: /home/hgrams/mnt/easyhgrams
5 SF20100126142353 Task: smhg00_all, Source: all
6 SF20100126150650 Task: smhg00_diskinfo, Source: disk_info
7 SF20100126151008 Task: SESAM_BACKUP, Source: /var/opt/sesam/var
Enter number of save set or q(uit) for exit >
Restore the partition information into the file system
The first saveset we want to restore is the task disk_info (No. 6). Then you have to choose if you want copy the data back to filesystem or want to create a LIS file from the saveset. Anschließend kann das entsprechende Save-Set für einen Restore ausgewählt werden. In diesem Fall wird die aktuellste "disk_info" Sicherung des Sesam server smhg00 ausgewählt (saveset "6"). At last we have to decide where the data should be restored (here /tmp/).
Enter number of save set or q(uit) for exit > 6 Do you want to copy files or create listing from save set ? (c/l) > c Enter target directory ( / means original place ) > /tmp Allow overwriting of equally named files at target (y/n) > y Starting supervisor process SMS_WATCH in queue qu_tape_trans2 supervisor process SMS_WATCH is started. I011-RECOVER Restoring save set SF20100126150650 on media HGB00002 (sbc -r -l full -o over -S "recover:11001" -d "SMS:/dev/nst0" -t "HGB00002:2" -s "SF20100126150650" -n 118 -v 1 -R "/tmp" 2>&1) 2010-01-27 09:07:10: sbc-3036: Info: # @(#)SESAM BACKUP CLIENT FOR UNIX FILE SYSTEMS, VERSION: 2.3A2 Build: 1.448 20090930 11:05:43 Linux i586 postfix # 2010-01-27 09:07:10: sbc-3063: Info: -------------------- Operation Parameters -------------------- 2010-01-27 09:07:10: sbc-3100: Info: Program PID: 5355 2010-01-27 09:07:10: sbc-3030: Info: Operation: RESTORE, Level: FULL 2010-01-27 09:07:10: sbc-3002: Info: Building file list from: ["sbc" "-r" "-l" "FULL" "-o" "over" "-S" "recover:11001" "-d" "SMS:/dev/nst0" "-t" "HGB00002:2" "-s" "SF20100126150650" "-n" "118" "-v" "1" "-R" "/tmp" ] 2010-01-27 09:07:10: sbc-3031: Info: Storage Host: recover:11001,0-0:: 2010-01-27 09:07:10: sbc-3032: Info: Control Host: recover:11001:: 2010-01-27 09:07:10: sbc-3033: Info: Device: SMS:/dev/nst0:SHARE:0 2010-01-27 09:07:10: sbc-3207: Info: sbc: Found libacl.so -> implicitly switching to acl mode. 2010-01-27 09:07:10: sbc-3035: Info: Saveset Source: SF20100126150650:0:ft:2:118:cpio 2010-01-27 09:07:10: sbc-3064: Info: --------------------- Operation Messages --------------------- 2010-01-27 09:07:10: sbc-3003: Info: Opening saveset: ... ...filelist... ... 016-RECOVER Copied files of save set SF20100126150650 on media HGB00002 to /tmp. protocol in file /sesam/sesam_srv_3.6.4.6/var/prot/recover_20100127090710.prt Listing of save sets 1 SF20100121181753 Task: smrh5_etc, Source: /etc 2 SF20100121182227 Task: lxhg00_etc, Source: /etc 3 SF20100121182501 Task: lxhg00_srv-data, Source: /srv/data 4 SF20100122100013 Task: lxhg00_mnt-easyhgrams, Source: /home/hgrams/mnt/easyhgrams 5 SF20100126142353 Task: smhg00_all, Source: all 6 SF20100126150650 Task: smhg00_diskinfo, Source: disk_info 7 SF20100126151008 Task: SESAM_BACKUP, Source: /var/opt/sesam/var Enter number of save set or q(uit) for exit >
The partition information will be restored to /tmp/var/opt/sesam/var/work/disk_info/.
Apply the partition information
Now the restored partition information will applied. Means, the hard disk(s) will be configured with that partition data. All data on the hard disk will be lost. The first parameter that will expected is the path to the partition information. The second parameter is auto. With it the partitioning process runs without any interaction.
sbc_disk_info_restore /tmp/var/opt/sesam/var/work/disk_info/ auto
The hard disk in the system has to be the same size or greater than the hard disk from the broken system. After the creation all paritions will mounted to /mnt/disk.
... mkdir: Verzeichnis „/mnt/disk/proc“ angelegt mkdir: Verzeichnis „/mnt/disk/sys“ angelegt Current mount status: ============================================================ /dev/hda1 on /mnt/disk type ext3 (rw) /dev/mapper/system-lv_syste_home on /mnt/disk/home type ext3 (rw) /dev/mapper/system-lv_system_opt on /mnt/disk/opt type ext3 (rw) /dev/mapper/sesam-lv_sesam_bin on /mnt/disk/opt/sesam type ext3 (rw) /dev/mapper/system-lv_system_srv on /mnt/disk/srv type ext3 (rw) /dev/mapper/system-lv_system_tmp on /mnt/disk/tmp type ext3 (rw) /dev/mapper/system-lv_system_usr on /mnt/disk/usr type ext3 (rw) /dev/mapper/system-lv_system_var on /mnt/disk/var type ext3 (rw) /dev/mapper/vtd-lv_vtd1 on /mnt/disk/VTD/VTD1 type ext3 (rw) ============================================================ Partitions should be formated and mounted correctly Please check these before continue with FULL restore of DATA Are you sure you want to continue? (yes/no):
The last question will be answered automatically by parameter auto. Now you have to check if all partition has been mounted properly and there is enough space for resore on them. Use the df command for that:
root@recover:~# df -h
Dateisystem Größe Benut Verf Ben% Eingehängt auf
aufs 443M 106M 337M 24% /
tmpfs 443M 0 443M 0% /lib/init/rw
udev 10M 788K 9,3M 8% /dev
tmpfs 443M 4,0K 443M 1% /dev/shm
/dev/hdc 284M 284M 0 100% /live/image
tmpfs 443M 106M 337M 24% /live/cow
tmpfs 443M 0 443M 0% /live
tmpfs 443M 292K 443M 1% /tmp
/dev/hda1 2,0G 68M 1,9G 4% /mnt/disk
/dev/mapper/system-lv_syste_home
3,0G 69M 2,8G 3% /mnt/disk/home
/dev/mapper/system-lv_system_opt
2,0G 68M 1,9G 4% /mnt/disk/opt
/dev/mapper/sesam-lv_sesam_bin
5,0G 139M 4,6G 3% /mnt/disk/opt/sesam
/dev/mapper/system-lv_system_srv
4,0G 137M 3,7G 4% /mnt/disk/srv
/dev/mapper/system-lv_system_tmp
1008M 34M 924M 4% /mnt/disk/tmp
/dev/mapper/system-lv_system_usr
5,0G 139M 4,6G 3% /mnt/disk/usr
/dev/mapper/system-lv_system_var
5,0G 139M 4,6G 3% /mnt/disk/var
/dev/mapper/vtd-lv_vtd1
30G 173M 28G 1% /mnt/disk/VTD/VTD1
Restore the "all" backup
In the next step we going to restore all backup (task smhg00_all). Here is important the data will be restored to /mnt/disk, i.e. to the mounted partitions and not to the RAM disk.
If you still have your separate root shell open with a running sm_recover, you can select the task smhg00_all (No. 5) and can execute the restore immediatly. If not you have again to start the sm_recover at the beginning.
... Listing of save sets 1 SF20100121181753 Task: smrh5_etc, Source: /etc 2 SF20100121182227 Task: lxhg00_etc, Source: /etc 3 SF20100121182501 Task: lxhg00_srv-data, Source: /srv/data 4 SF20100122100013 Task: lxhg00_mnt-easyhgrams, Source: /home/hgrams/mnt/easyhgrams 5 SF20100126142353 Task: smhg00_all, Source: all 6 SF20100126150650 Task: smhg00_diskinfo, Source: disk_info 7 SF20100126151008 Task: SESAM_BACKUP, Source: /var/opt/sesam/var Enter number of save set or q(uit) for exit > 5 Do you want to copy files or create listing from save set ? (c/l) > c Enter target directory ( / means original place ) > /mnt/disk Allow overwriting of equally named files at target (y/n) > y Starting supervisor process SMS_WATCH in queue qu_tape_trans2 supervisor process SMS_WATCH is started. I011-RECOVER Restoring save set SF20100126142353 on media HGB00002 (sbc -r -l full -o over -S "recover:11001" -d "SMS:/dev/nst0" -t "HGB00002:2" -s "SF20100126142353" -n 111 -v 1 -R "/mnt/disk" 2>&1) 2010-01-27 09:44:31: sbc-3036: Info: # @(#)SESAM BACKUP CLIENT FOR UNIX FILE SYSTEMS, VERSION: 2.3A2 Build: 1.448 20090930 11:05:43 Linux i586 postfix # 2010-01-27 09:44:31: sbc-3063: Info: -------------------- Operation Parameters -------------------- 2010-01-27 09:44:31: sbc-3100: Info: Program PID: 5557 2010-01-27 09:44:31: sbc-3030: Info: Operation: RESTORE, Level: FULL 2010-01-27 09:44:31: sbc-3002: Info: Building file list from: ["sbc" "-r" "-l" "FULL" "-o" "over" "-S" "recover:11001" "-d" "SMS:/dev/nst0" "-t" "HGB00002:2" "-s" "SF20100126142353" "-n" "111" "-v" "1" "-R" "/mnt/disk" ] 2010-01-27 09:44:31: sbc-3031: Info: Storage Host: recover:11001,0-0:: 2010-01-27 09:44:31: sbc-3032: Info: Control Host: recover:11001:: 2010-01-27 09:44:31: sbc-3033: Info: Device: SMS:/dev/nst0:SHARE:0 2010-01-27 09:44:31: sbc-3207: Info: sbc: Found libacl.so -> implicitly switching to acl mode. 2010-01-27 09:44:31: sbc-3035: Info: Saveset Source: SF20100126142353:0:ft:2:111:cpio 2010-01-27 09:44:31: sbc-3064: Info: --------------------- Operation Messages --------------------- 2010-01-27 09:44:31: sbc-3003: Info: Opening saveset: ... ...file list... ... 2010-01-27 09:55:57: sbc-3020: Info: End of archive reached. 2010-01-27 09:55:57: sbc-3006: Info: Saveset size: 12673841213 bytes. Throughput: 63428.834808 MB/Hour. 2010-01-27 09:55:57: sbc-3005: Info: Closing saveset. 2010-01-27 09:55:57: sbc-3052: Info: Items processed correctly: [158149]. Not processed or incorrectly processed items: [0]. 2010-01-27 09:55:57: sbc-3007: Info: Operation successful. 2010-01-27 09:55:57: sbc-3001: Info: Exiting. I016-RECOVER Copied files of save set SF20100126142353 on media HGB00002 to /mnt/disk. protocol in file /sesam/sesam_srv_3.6.4.6/var/prot/recover_20100127094431.prt Listing of save sets 1 SF20100121181753 Task: smrh5_etc, Source: /etc 2 SF20100121182227 Task: lxhg00_etc, Source: /etc 3 SF20100121182501 Task: lxhg00_srv-data, Source: /srv/data 4 SF20100122100013 Task: lxhg00_mnt-easyhgrams, Source: /home/hgrams/mnt/easyhgrams 5 SF20100126142353 Task: smhg00_all, Source: all 6 SF20100126150650 Task: smhg00_diskinfo, Source: disk_info 7 SF20100126151008 Task: SESAM_BACKUP, Source: /var/opt/sesam/var Enter number of save set or q(uit) for exit >
Restore the SESAM_BACKUP
The last saveset we have to restore is the own Sesam server backup (task SESAM_BACKUP / No. 7):
... Listing of save sets 1 SF20100121181753 Task: smrh5_etc, Source: /etc 2 SF20100121182227 Task: lxhg00_etc, Source: /etc 3 SF20100121182501 Task: lxhg00_srv-data, Source: /srv/data 4 SF20100122100013 Task: lxhg00_mnt-easyhgrams, Source: /home/hgrams/mnt/easyhgrams 5 SF20100126142353 Task: smhg00_all, Source: all 6 SF20100126150650 Task: smhg00_diskinfo, Source: disk_info 7 SF20100126151008 Task: SESAM_BACKUP, Source: /var/opt/sesam/var Enter number of save set or q(uit) for exit > 7 Do you want to copy files or create listing from save set ? (c/l) > c Enter target directory ( / means original place ) > /mnt/disk Allow overwriting of equally named files at target (y/n) > y Starting supervisor process SMS_WATCH in queue qu_tape_trans2 supervisor process SMS_WATCH is started. I011-RECOVER Restoring save set SF20100126151008 on media HGB00002 (sbc -r -l full -o over -S "recover:11001" -d "SMS:/dev/nst0" -t "HGB00002:2" -s "SF20100126151008" -n 119 -v 1 -R "/mnt/disk" 2>&1) 2010-01-27 09:58:43: sbc-3036: Info: # @(#)SESAM BACKUP CLIENT FOR UNIX FILE SYSTEMS, VERSION: 2.3A2 Build: 1.448 20090930 11:05:43 Linux i586 postfix # 2010-01-27 09:58:43: sbc-3063: Info: -------------------- Operation Parameters -------------------- 2010-01-27 09:58:43: sbc-3100: Info: Program PID: 6075 2010-01-27 09:58:43: sbc-3030: Info: Operation: RESTORE, Level: FULL 2010-01-27 09:58:43: sbc-3002: Info: Building file list from: ["sbc" "-r" "-l" "FULL" "-o" "over" "-S" "recover:11001" "-d" "SMS:/dev/nst0" "-t" "HGB00002:2" "-s" "SF20100126151008" "-n" "119" "-v" "1" "-R" "/mnt/disk" ] 2010-01-27 09:58:43: sbc-3031: Info: Storage Host: recover:11001,0-0:: 2010-01-27 09:58:43: sbc-3032: Info: Control Host: recover:11001:: 2010-01-27 09:58:43: sbc-3033: Info: Device: SMS:/dev/nst0:SHARE:0 2010-01-27 09:58:43: sbc-3207: Info: sbc: Found libacl.so -> implicitly switching to acl mode. 2010-01-27 09:58:43: sbc-3035: Info: Saveset Source: SF20100126151008:0:ft:2:119:cpio 2010-01-27 09:58:43: sbc-3064: Info: --------------------- Operation Messages --------------------- 2010-01-27 09:58:43: sbc-3003: Info: Opening saveset: ... ...file list ... 2010-01-27 10:03:54: sbc-3020: Info: End of archive reached. 2010-01-27 10:03:54: sbc-3006: Info: Saveset size: 4510163537 bytes. Throughput: 49789.124312 MB/Hour. 2010-01-27 10:03:54: sbc-3005: Info: Closing saveset. 2010-01-27 10:03:54: sbc-3052: Info: Items processed correctly: [19173]. Not processed or incorrectly processed items: [0]. 2010-01-27 10:03:54: sbc-3007: Info: Operation successful. 2010-01-27 10:03:54: sbc-3001: Info: Exiting. I016-RECOVER Copied files of save set SF20100126151008 on media HGB00002 to /mnt/disk. protocol in file /sesam/sesam_srv_3.6.4.6/var/prot/recover_20100127095841.prt Listing of save sets 1 SF20100121181753 Task: smrh5_etc, Source: /etc 2 SF20100121182227 Task: lxhg00_etc, Source: /etc 3 SF20100121182501 Task: lxhg00_srv-data, Source: /srv/data 4 SF20100122100013 Task: lxhg00_mnt-easyhgrams, Source: /home/hgrams/mnt/easyhgrams 5 SF20100126142353 Task: smhg00_all, Source: all 6 SF20100126150650 Task: smhg00_diskinfo, Source: disk_info 7 SF20100126151008 Task: SESAM_BACKUP, Source: /var/opt/sesam/var Enter number of save set or q(uit) for exit > q SEPuler - the timecontrol of SEPsesam - is unblocked ... STATUS=SUCCESS MSG=I010-RECOVER Restored 3 save sets
Now you can exit the sm_restore bcs. all restore are done.
Install the boot loader
After successful restores the boot loader has to rewritten in the Master Boot Record (MBR). The command grub-install will make the boot partition bootable. Therefore two parameters are given:
- Where ist root of the recovered system ?
- Which hard disk the boot loader schould be installed for
root@recover:~# grub-install --root-directory=/mnt/disk/ hd0 grub-probe: error: Cannot open `/boot/grub/device.map' /usr/sbin/grub-install: line 374: [: =: unary operator expected Installation finished. No error reported. This is the contents of the device map /mnt/disk//boot/grub/device.map. Check if this is correct or not. If any of the lines is incorrect, fix it and re-run the script `grub-install'. (hd1) /dev/hdb (fd0) /dev/fd0 (hd0) /dev/hda
In this example the boot loader should be installed on the first hard disk. What hard disks exist in the system you can see in the file:
/mnt/disk/boot/grub/device.map
Reboot the recovered system
When the installation of the boot loader finished successfully ("Installation finished, no Errors Reported" - you can ignore the error "unary operator expected") then you can reboot the recovered system by typing the command reboot in the root console.




