How to restore individual files from disk using flexbackup on e-smith  
e-smith release:  4.1.x

Author:  Des Dougan (   

Release: 0.2, 7 November 2001

This document explains how to use flexbackup to restore individual files backed up to a disk drive on a client workstation. It has been tested with version 4.1.2 and should work with versions 4.1.1 and 4.1. This HOWTO is the companion to the "How to backup to disk using flexbackup" document.

I run e-smith on my small home LAN. Currently, I'm without a tape drive but wanted to be able to restore any files I needed from the backup I run weekly to my workstation.

STEP 1: Visit and implement this HOWTO:

STEP 2: Creating the restore script

As root, in root's home directory, create the following script using your favourite editor:

[root@e-smith]# vi flexbackup_restore

mount /mnt/backup
cd /
/usr/bin/flexbackup -extract /mnt/backup/root.0.YYYYMMDD.dump.gz  -files /root/extract-list
umount /mnt/backup

The "mount" command makes the share available so that you can access the backup archive, while the "cd" command will enable the files to be restored to their original location. It should be omitted if you want to restore to a different directory. "YYYYMMDD" is the date stamp of the backup from which you want to restore and will need to be edited for each use.

Creating the restore file list

You will now need to create a file containing the names of all the files you wish to restore:

[root@e-smith]# vi extract-list


The above example will restore all the files in the named directory. To restore a number of individual files, create a line for each file:


Running the restore

When you've completed the above two steps, you're ready to go:

[root@e-smith]# ./flexbackup_restore

As the process runs, you will see output similar to the following:

flexbackup version 0.9.8 <>
/etc/flexbackup.conf syntax OK

| Auto-set to type=dump compress=gzip
| Reading from file; "mt setblk 0" skipped
| Reading from on-disk file /mnt/backup/root.0.20011027.dump.gz
| Reading from file; "mt tell" skipped
| Extracting files listed in /root/extract-list
| buffer -m 3m -s 10k -t -p 75 -B -i /mnt/backup/root.0.20011027.dump.gz | \
|  gzip -dq | restore -x -o -v -b 10 -f - \
|  etc/e-smith/templates-custom/etc/cron.d/backup
restore: ./etc: File exists
restore: ./etc/e-smith: File exists
restore: ./etc/e-smith/templates-custom: File exists
restore: ./etc/e-smith/templates-custom/etc: File exists
Verify tape and initialize maps
Dump   date: Sat Oct 27 22:20:07 2001
Dumped from: the epoch
Level 0 dump of / on e-smith:/dev/sda6
Label: none
Extract directories from tape
Initialize symbol table.
Make node ./etc/e-smith/templates-custom/etc/cron.d
Make node ./etc/e-smith/templates-custom/etc/cron.d/backup
Extract requested files
extract file ./etc/e-smith/templates-custom/etc/cron.d/backup/backup
Add links
Set directory mode, owner, and times.
| Reading from file; "mt tell" skipped