SEP sesam enables you to perform a selective restore from the unknown tape using the command line (SBC CLI). Selective restore is a process by which only the selected parts of data on the saveset, such as individual files and directories, are restored.
Selective restore by using the command line
Restore steps at a glance:
- Insert the tape into the tape drive.
- Set the SEP sesam profile, as described in FAQ: How to set a SEP sesam profile.
- List all the backups on the tape drive.
- Perform a complete restore of the saveset(s).
- Perform a selective restore.
Insert the tape into the tape drive
Insert/load the tape that contains the backup you want to restore into the tape drive.
List the backups on the tape by using sm_sms_interface
sm_sms_interface dir -d <tape_drive>
Example for the first non-rewinding tape drive on Linux:
sm_sms_interface dir -d /dev/nst0
This article describes how to restore the SEP sesam Server from tape via sbc without using sm_recover. For details on SBC CLI usage and available commands, see SBC CLI. The described procedure works only if the SESAM_BACKUP saveset is on ONE tape.
- Operating system with working tape drive or loader device.
- Installed SEP sesam Server (identical version to the preceding system): Install the same SEP sesam Server package that was installed on the old system and set up the new server system in the same way as the previous one. For details on installation, see SEP sesam Quick Install Guide. If your tape drive / tape library is connected to an RDS, configure the RDS in the sesam database.
- A medium that contains correctly saved SESAM_BACKUP (containing <SESAM_VAR> and <SESAM_ROOT>/bin/sesam directories). For details, see Configuring SESAM_BACKUP.
The restore of the SEP sesam Server described below is a two-step procedure consisting of determining the required saveset information and restoring via sbc.
Listing the savesets on the tape via sm_sms_interface
Use the sm_sms_interface command to access the SMS Server and identify the available savesets on tape. Insert the tape with the SESAM_BACKUP backup savesets and identify the savesets on the tape device by using the command:
sm_sms_interface dir -d <tape_device>
|On Windows, replace the tape device identifier (/dev/nst0) with the corresponding Windows device (Tape0).|
Obtain the required information from the output as shown in the example below:
- The first number in the highlighted line is the segment number; in our example: 4.
- The SavesetName is SEP sesam unique identification assigned to a saveset; in our example: SC20090610105624.
- The Tapelabel in the header displays the <tape_name>; in our example: cefix00001.
- The TapeID in the header displays the <tape_id>; in our example: (1)
Perform a complete restore
To perform a complete restore of the selected saveset, check the example above about obtaining the required information, and then run the following sbc command:
sbc -r -l FULL -C <client_host>:11001 -S <server_host>:11001 -d SMS:<tape_device> -t <tape_label>:<tape_id> -s <saveset_id> -n <segment_number> -R /<restore_target>
Perform a selective restore
The procedure for selective restore from the command line consists of the following steps:
- Re-create the SEP sesam listing files using sm_arch.
- Create a selective file.
- Start the selective restore from the command line.
Step 1: Re-create the SEP sesam listing files by using sm_arch
Re-create the SEP sesam listing files (*.lis) from tape. SEP sesam *.lis' files contain information about the backup's unique files that are used by restore. The command sm_arch restore_journal creates a new *.lis file for the corresponding medium.
sm_arch restore_journal -d <drive> -m <media_pool> -t <tape_label> -T <tape_type> -s <saveset_ID>
|You have to enter the entire saveset ID, including the characters after the @ sign if they exist.|
- The following example uses the values from the above output:
sm_arch restore_journal -d 1 -m cefix -t cefix00001 -T LTO -s SC20090610105624
sm_arch restore_journal -d 1 -m cefix -t cefix00001 -T LTO -s SC20090610105624@gft456Sd
Once the journal is restored, you can find the new .lis file in the
Step 2: Create a selective list of files
Create a selective list of files for the specific data you want to restore.
- Grep the previously created .lis file for the file names (and in the next step write these to a to a file of your liking ending with .sel).
- Write the output of this command (complete) line to a file called <saveset_ID>.sel; in our example this is SC20090610105624.sel.
- Copy this file to
grep <my_desired_file_to_restore> <SESAM_INSTAL_DIR>/var/lis/<lis_file_generated_with_sm_arch>.lis
Step 3: Start the restore in the selective mode
Start the restore by specifying the selective mode; use the following command:
sbc -r -l sel -C <client_host>:11001 -S <server_host>:11001 -d SMS:<tape_device> -t <tape_label>:<tape_id> -s <saveset_id> -n <segment_number> -R /<restore_target>
This command looks for a file in the
<SESAM_INSTALL_DIR>/var/work/smslis/ directory which contains the name of the saveset ID and restores only the file listed in this selective file.