5.29.2006

fbackup/frecover tips

Diagnostics: HP Library and Tape Tools (L&TT or LTT)

in: /opt/ltt and the main program: /opt/ltt/hp_ltt


most of our maintenance scripts are contained in:

/home/maint/bin


Our main backup script and associated files are in:

/home/maint/bin/fbackup main script: /home/maint/bin/fbackup/bin/fullback.sh


An email reminder to swap the tape is sent when the backup job is complete. Tapes must be swapped every M-F.



Notes on using fbackup:


fbackup -v -f /dev/rmt/1m -f /dev/rmt/2m -I /indexfile.txt -g graphfile -i include_path -i include_another -c configFile


fbackup graph files do not support wildcards....


graph file contents:

i /include_me

e /exclude_me


If media is write protected you'll see something similar to the following:

fbackup(3032): could not open output file /dev/rmt/2m


default fbackup config used by sam: /etc/sam/br/fbackup_config

fbackup stores incremental backup information in /var/adm/fbackupfiles/dates

fbackup -u option updates the 'dates' files: /var/adm/fbackupfiles/dates


fbackup config file : current config file used in production: /home/maint/fbackup/cfg/best

current config file

description of each line

blocksperrecord 256

+ Number of 1024-byte blocks per record.

records 32

+ Number of records of shared memory to allocate.

checkpointfreq 1024

+ Number of records between checkpoints. Since the EOF marks between checkpoints are also used for fast searching on DLT tape drives, changing the checkpoint frequency may also affect selective recovery speed (see WARNINGS section).

readerprocesses 6

+ Number of file-reader processes.

maxretries 5

+ Maximum number of times fbackup is to retry an active file.

retrylimit 5000000

+ Maximum number of bytes of media to use while retrying the backup of an active file.

maxvoluses 2000

+ Maximum number of times a magnetic tape volume can be used.

filesperfsm 2000

+ The number of files between the fast search marks on DDS tapes. The cost of these marks are negligible in terms of space on the DDS tape. Not all DDS tape devices support fast search marks.

chgvol /home/maint/fbackup/bin/chgvol

+ Name of a file to be executed when a volume change occurs. This file must exist and be executable.

error /home/maint/fbackup/bin/error

+ Name of a file to be executed when a fatal error occurs. This file must exist and be executable.



Clearing fbackup header:

If you wish to clear the fbackup volume header from an fbackup tape because you want to blank out the number of times the tape has been used, use another backup utility on the tape. For example:

tar -cvf /dev/rmt/1m file_to_backup


frecover - recovering files from fbackup tape:

recovering files may take quite a long time, escpecially if they are small files. To restore a small home directory containing less than 18mb took over 10minutes, compared to restoring an 8.5GB file which took only 17 minutes.

Unlike fbackup, single files and wildcarded files(sometimes) may be specified and recovered using frecover. In either fbackup or frecover, the hyphen ( - ) can be used almost anywhere to write/read to/from stdout (standard output). This can be used to pipe commands together as well.


to export the contents (the index) of an fbackup tape:

frecover -f /dev/rmt/1m -I /path/index_file

to write contents to stdout: frecover -f /dev/rmt/1m -I -

to view the volume header ( contains fbackup specific info ):

frecover -f /dev/rmt/1m -V /path/volume_file


test recover (N option): preform the same options, but don't recover the files to disk:

frecover -xvN -f /dev/rmt/1m


recover everything (should only be done in the event of a total system failure):

frecover -v -r -f /dev/rmt/1m

or

frecover -v -x -f /path_to_fbackup_file


recover all files on tape to the current directory without creating directory structure

frecover -v -x -f /dev/rmt/1m -F


recover all the files in the -i included path to the current directory without creating directory structure

frecover -v -x -f /dev/rmt/1m -F -i /home/maint/fbackup/cfg


recover entire tape contents to current working directory:

frecover -v -x -f /dev/rmt/1m -X


recover graph contents to current working directory:

frecover -v -x -f /dev/rmt/1m -X -g mygraphfile


recover /home/maint/fbackup to current working directory:

frecover -v -x -f /dev/rmt/1m -X -i /home/maint/fbackup/


recover back to orginal file location. File on disk will not be over-written if it's newer than the file from the tape. Use the -o option CAUTIOUSLY to bypass this limitation.

frecover -vxf /dev/rmt/1m -i /home/maint/bin/showuser.sh


frecover option:

-m Print a message each time a file marker is encountered.

Using this option, frecover prints a message each time

either a DDS fast search mark, a filemark (EOF), or a

checkpoint record is read. Although useful primarily for

troubleshooting, these messages can also be used to

reassure the user that the backup is progressing during

long, and otherwise silent, periods during the recovery.



UNKNOWN TAPE FORMAT - extraction:

if tape is of unknown format you can extract the contents using pax:

cd to_path_where_extracted_files_should_be_placed

pax -rv -s'/^\///' </dev/rmt/0m




tar - tape archiver:

WARNING: Use -tV to list all the files on the tape before extracting, because tar will not prompt to overwrite and will restore to the fully qualified pathname that is stored in the archive. So when creating a tar archive, please remember to use relative path names and not absolute ones. If no file argument is given, the entire content of the archive is extracted. Note that if several files with the same name are on the archive, the last one overwrites all earlier ones. Wildcards don't work.

tar -cvf /dev/rmt/1m path_to_archive -create a new archive

tar -cvf /dev/rmt/1m -C /home/maint . -create new archive, first change to /home/maint and backup that directory using the relative path (.) Multiple -C options can be used

tar -tVf /dev/rmt/1m -list all files on tape

tar -xvf /dev/rmt/1m - extract all files from tape

tar -xvwf /dev/rmt/1m - extract all files from tape prompting the user to restore each file

tar -xvf /dev/rmt/1m ./index_file - extract the file named index_file into the current directory.


MAKE_TAPE_RECOVERY:

make_tape_recovery: makes a bootable recovery tape

copy_boot_tape: make a copy of a recovery tape


/makerecovery.sh is the custom make_tape_recovery script that creates a recovery tape.


Ejecting a tape:

mt -f /dev/rmt/1mnb offline


Obtaining tape drive status:

mt -f /dev/rmt/2mnb status --show if tape is write protected


st -f /dev/rmt/0mnb -s --limited to displaying if device is OK and ready



No comments: