5 1 0:Selective Restore from the Command Line

From SEPsesam
Other languages:


Docs latest icon.png Welcome to the latest SEP sesam documentation version 5.1.0 Apollon. 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

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.

Prerequisites

  • 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.

Restore procedure

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>
Information sign.png Note
On Windows, replace the tape device identifier (/dev/nst0) with the corresponding Windows device (Tape0).

Sms4.jpg

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>

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

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.