Selective Restore from the Command Line
Copyright © SEP AG 1999-2021. All rights reserved.
Any form of reproduction of the contents or parts of this manual is allowed only with the express written permission from SEP AG. When compiling and designing user documentation SEP AG uses great diligence and attempts to deliver accurate and correct information. However, SEP AG cannot issue a guarantee for the contents of this manual.
|WORK IN PROGRESS|
|This page is a draft. Treat the information on this page with caution as it may be incomplete.|
- 1 Overview
- 2 Selective restore by using the command line
- 2.1 Insert the tape into the tape drive
- 2.2 List the backups on the tape by using sm_sms_interface
- 2.3 Perform a complete restore
- 2.4 Perform a selective restore
- 3 See also
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
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.