Extract some of the files from a dump using restore

This example demonstrates extracting some files from a dump backup file using restore. The backup files live in a directory /mnt/mikan. Each file is very large (about 100 GB). They're compressed with gzip, so the first step was to uncompress one of the files with gzip -d --keep mikan-root-2016-08-07.gz.

[root@mikan /mnt/mikan]# ls
mikan-root-2015-02-10.gz	mikan-root-2016-03-27.gz
mikan-root-2015-04-27.gz	mikan-root-2016-06-26.gz
mikan-root-2015-07-26.gz	mikan-root-2016-08-07
mikan-root-2015-09-27.gz	mikan-root-2016-08-07.gz
mikan-root-2015-12-27.gz	mikan-root-2016-08-21.gz
[root@mikan /mnt/mikan]# restore -i -f mikan-root-2016-08-07
restore > cd usr/home/share/websites	
restore > cd www.lemoda.net	
restore > cd common/unused
restore > ls
./usr/home/share/websites/www.lemoda.net/common/unused:
about/                              lookalikes/

restore > add .
restore > extract
You have not read any tapes yet.
If you are extracting just a few files, start with the last volume
and work towards the first; restore can quickly skip tapes that
have no further files to extract. Otherwise, begin with volume 1.
Specify next volume #: 1
set owner/mode for '.'? [yn] n
restore > quit
[root@mikan /mnt/mikan]# ls
mikan-root-2015-02-10.gz	mikan-root-2016-06-26.gz
mikan-root-2015-04-27.gz	mikan-root-2016-08-07
mikan-root-2015-07-26.gz	mikan-root-2016-08-07.gz
mikan-root-2015-09-27.gz	mikan-root-2016-08-21.gz
mikan-root-2015-12-27.gz	usr
mikan-root-2016-03-27.gz

The extracted files are all found under usr in the above directory. The user and modification times are all restored.

Web links


Copyright © Ben Bullock 2009-2019. All rights reserved. For comments, questions, and corrections, please email Ben Bullock (benkasminbullock@gmail.com) or use the discussion group at Google Groups. / Privacy / Disclaimer