Usage of "restore"

Warren Block wblock at wonkity.com
Mon Jan 28 15:50:40 UTC 2013


On Mon, 28 Jan 2013, Ralf Mardorf wrote:

> I don't understand how to use the restore command.
>
> root at freebsd:/mnt/dump # restore -v -t dump-9.1-RELEASE-20130123_193142-usr_f.dump
> Verify tape and initialize maps
> /dev/sa0: No such file or directory

sa0 is the tape device, used by default if -f is not specified.

> root at freebsd:/mnt/dump # restore -v -t -f dump-9.1-RELEASE-20130123_193142-usr_f.dump

That is the right way to list the contents.

> Verify tape and initialize maps
> Tape block size is 32
> Tape is not a dump tape

Except...

> dump -0Launf - $rootdir_a | bzip2 > "$dump_path-roota.dump"

The files that are called dump files are actually compressed with bzip2. 
So they need to be uncompressed.  It would be good to change the backup 
script to name the files ".dump.bz2" or something similar.

Untested, but overconfidently:

# bzcat dump-9.1-RELEASE-20130123_193142-usr_f.dump | restore -v -t -f -


For reference:
http://www.wonkity.com/~wblock/docs/html/backup.html


More information about the freebsd-questions mailing list