Sonora Communications, Inc.

  • Increase font size
  • Default font size
  • Decrease font size

How to Perform a Flexbackup Interactive Restore

E-mail Print PDF

Flexbackup is a great backup software.  We have used it for many years and it is simple and more reliable than any other tape backup software we have used...and we have used a lot of them!

Flexbackup does not keep a database of backups.  It puts the onus on the backup administrator to keep track of which tape has which data.  This might be viewed negatively by some, but in our significant experience Flexbackup's simplicity reduces service calls for backup problems dramatically.

We stongly recommend the GFS backup tape rotation scheme.

Basic Interactive Restore Procedure 

To perform an interactive restore you will issue commands similare to these:

cd /
/bin/mt -f /dev/nst0 rewind
/bin/mt -f /dev/nst0 fsf 1
/usr/bin/flexbackup -restore

(enter flexbackup commands)
(be patient! - wait for the restore to finish!)
(it will take hours even if only one file!)

/bin/mt -f /dev/nst0 rewind

These commands do the following:

  • change to the root directory
    • this places all restored files in their original locations
  • change to any temporary directory you want if you prefer not to restore files to their original locations
  • rewinds the tape
  • advances the tape 1 block which is where Flexbackup placed the catalog of backed up files
  • starts Flexbackup in interactive mode
    • enter your interactive commands
  • rewinds the tape when done

Alternately you could create a script including these commands and launch the script from the command line.  As an example if you created the script named '/root/flexbackup/custom-restore', you would launch the script by entering:

/root/flexbackup/custom-restore

NOTE: The first line cd / will restore your files to their original locations.  To restore to the current directory, remove the 'cd /' entry. Remember the restore includes the full path.  As an example, if your current directory is /root and you restore /home/e-smith/files/ibays, the restored files will be found under /root/home/e-smith/files/ibays/.

Available Commands when Running 'flexbackup -restore' in Interactive Mode

ls [arg] - list directory
cd arg - change directory
pwd - print current directory
add [arg] - add `arg' to list of files to be extracted
delete [arg] - delete `arg' from list of files to be extracted
extract - extract requested files
setmodes - set modes of requested directories
quit - immediately exit program
what - list dump header information
verbose - toggle verbose flag (useful with ``ls'')
prompt - toggle the prompt display
help or `?' - print this list

If no `arg' is supplied, the current directory is used.

Sample Interactive Restore Session

This is an actual restore session.  Blue text are commands we entered. 

[root@rwsvr root]# cd /
[root@rwsvr /]# /bin/mt -f /dev/nst0 rewind
[root@rwsvr /]#
/bin/mt -f /dev/nst0 stat
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x26 (DDS-4 or QIC-4GB).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN

[root@rwsvr /]# /bin/mt -f /dev/nst0 fsf 1
At block 1.
[root@rwsvr /]# flexbackup -restore

flexbackup version 1.1.7 (http://flexbackup.sourceforge.net)
/etc/flexbackup.conf syntax OK

[root@rwsvr /]# flexbackup -restore
flexbackup version 1.1.7 (
http://flexbackup.sourceforge.net)
/etc/flexbackup.conf syntax OK

|------------------------------------------------------------
| Checking 'buffer' on this machine... Ok
| Checking /bin/sh on this machine... bash2
|------------------------------------------------------------
| Logging output to "flexbackup.restore.200706131408.log"
| Reading from CURRENT TAPE POSITION
|------------------------------------------------------------
At block 1.
|------------------------------------------------------------
| buffer -m 3m -s 10k -u 100 -t -p 75 -B -i "/dev/nst0" | gzip -dq |
|   restore -i  -b 10 -f -
|------------------------------------------------------------

restore > verbose
verbose mode on
restore >
cd /home/e-smith/files/ibays/company/files/
restore > ls
./home/e-smith/files/ibays/company/files:
.recycle/            INSTALL.LOG          presentsinstall.exe
AA/                  LaserApp/            support/
ING/                 Morningstar/

restore > add AA/
restore: ./home: File exists
restore: ./home/e-smith: File exists
restore: ./home/e-smith/files: File exists
restore: ./home/e-smith/files/ibays: File exists
restore: ./home/e-smith/files/ibays/company: File exists
restore: ./home/e-smith/files/ibays/company/files: File exists
restore: ./home/e-smith/files/ibays/company/files/AA: File exists
restore: ./home/e-smith/files/ibays/company/files/AA/List: File exists
restore: ./home/e-smith/files/ibays/company/files/AA/eREPORTS: File exists
restore: ./home/e-smith/files/ibays/company/files/AA/SPELL: File exists
restore: ./home/e-smith/files/ibays/company/files/AA/DST: File exists
---snip---
restore > extract
Extract requested files
extract file ./home/e-smith/files/ibays/company/files/AA/WORDMRGE/MJ/aa.dot
extract file ./home/e-smith/files/ibays/company/files/AA/WORDMRGE/MJ/aa master letter.doc
extract file ./home/e-smith/files/ibays/company/files/AA/WORDMRGE/MJ/avery labels 5262 with barcodes.doc
extract file ./home/e-smith/files/ibays/company/files/AA/WORDMRGE/MJ/avery labels 5262.doc
---snip---

set owner/mode for '.'? [yn] y

restore > quit
buffer (writer): write of data failed: Success
bytes to write=10240, bytes written=2048, total written   10061570K
|------------------------------------------------------------
At block 1006462.
|------------------------------------------------------------

[root@rwsvr /]# /bin/mt -f /dev/nst0 rewind

Last Updated on Sunday, 06 July 2008 17:35  

Your external IP

You are connecting to this site from: 38.107.179.234

Secure Client Login

Email Address:

Password: