Source:Selective Restore from the Command Line

From SEPsesam
Revision as of 16:57, 8 December 2020 by Sta (talk | contribs) (Marked this version for translation)
Other languages:

Copyright © SEP AG 1999-2024. 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.

Draft.png WORK IN PROGRESS
This article is in the initial stage and may be updated, replaced or deleted at any time. It is inappropriate to use this document as reference material as it is a work in progress and should be treated as such.
Docs latest icon.png Welcome to the latest SEP sesam documentation version 4.4.3/4.4.3 Beefalo V2. For previous documentation version(s), check Documentation archive..


Overview

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:

  1. Insert the tape into the tape drive.
  2. Set the SEP sesam profile, as described in FAQ: How to set a SEP sesam profile.
  3. List all the backups on the tape drive.
  4. Perform a complete restore of the saveset(s).
  5. 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

Set the SEP sesam profile to be able to execute the SEP sesam commands globally. Then use the sm_sms_interface command to access the SMS Server and identify the available savesets on the tape drive:

sm_sms_interface dir -d <tape_drive>

Example for the first non-rewinding tape drive on Linux:

sm_sms_interface dir -d /dev/nst0

Restore from tape via SBC without a valid SEP sesam database/en

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>

Restore suc.jpg

Perform a selective restore

The procedure for selective restore from the command line consists of the following steps:

  1. Re-create the SEP sesam listing files using sm_arch.
  2. Create a selective file.
  3. 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>
Information sign.png Note
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
  • More recent SEP sesam versions are using the extended saveset ID. In this case, use the entire saveset ID (including the characters after the @ sign):
  • 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 <SESAM_INSTALL_DIR>/var/lis/ directory.

Step 2: Create a selective list of files

Create a selective list of files for the specific data you want to restore.

  1. 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).
  2. grep <my_desired_file_to_restore> <SESAM_INSTAL_DIR>/var/lis/<lis_file_generated_with_sm_arch>.lis
  3. Write the output of this command (complete) line to a file called <saveset_ID>.sel; in our example this is SC20090610105624.sel.
  4. Copy this file to <SESAM_INSTALL_DIR>/var/work/smslis/SC20090610105624.sel.

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.

See also

SBC CLIRestore