storeBackupRecover.pl
Restores the backup tree or parts of the backup tree.
storeBackupRecover.pl -r restore [-b root] -t targetDir [--flat]
[-o] [--tmpdir] [--noHardLinks] [-p number] [-v] [-n]
[--cpIsGnu] [--noGnuCp] [-s]
To restore one file or a small number of files, the easiest way is to
use cp or a file system browser. This tool is intended to restore (and
if necessary uncompress) files. It recreates the backed up data in the
same way it was in the original source directory: permissions are set
(even if option ignorePerms was set in storeBackup.pl; this option
affects only the permissions in the backup tree) and also existing
hard links which were in the source tree are reconstructed.
You have to use at least two options: restoreTree and
targetDir. StoreBackupRecover.pl only supports command line
arguments.
- --restoreTree / -r
- Backup tree or part of a backup tree
to restore. The easiest way to restore something is to go into the
backup directory where the tree you want to restore is located. I
now assume its name is mydir. Then type:
# storeBackupRecover.pl -r mydir -t /tmp/myRestorePlace
where /tmp/myRestorePlace is the place where you want that
directory and all of its content to be restored (see option
targetDir).
- --backupRoot / -b
- Normally, there should be no need to
use this option! When you restore a directory, storeBackupRecover.pl
does this by searching for .md5CheckSum.info which is in the root
directory of each backup. If it finds more than one of these files it
generates an ERROR message. This normally will happen if you make a
storeBackup backup of a storeBackup backup and want to restore.
If you get an error message like ``found info file a second time
...'', you need to specify the root of this backup (where you
recover with the option restoreTree).
- --targetDir / -t
- The directory where you want the
recovered files to be stored. Unless you use option flat, storeBackup
always restores the complete backup path to the tree you specified
with option restoreTree.
- --flat
- The directory structure is not restored. All
files are stored directly in ``targetDir''. This is only useful if
you recover a small number of files.
- --overwrite / -o
- Overwrite existing files (normally not
a good idea). It is better to restore in a separate directory and move
files around later.
- --tmpdir / -T /tmpdir
- Directory for temporary files,
default is picked from environment variable
$TMPDIR
. If it does not exist, /tmp is set as
the default value.
- --noHardLinks
- Do not reconstruct hard links in the restore
tree, always copy files.
- --noRestoreParallel / -p
- Maximal number or parallel
started processes to uncompress the files in the backup. Default is
12.
Reduce this number if you are restoring blocked files
and the system has insufficient RAM.
- --verbose / -v
- Print verbose messages.
- --noRestored / -n
- At the end of restoring, print the
number of restored dirs, hard links, symbolic links, files, etc.
- --noGnuCp
- If you configured storeBackup.pl to use gnucp
(option cpIsGnu), so it can backup special files like character
devices, then storeBackupRecover.pl reads this information in the
backup. But if the computer where you restore the backup has no
gnucp installed, you
can configure storeBackupRecover.pl not to use cp.
If you made your backup without gnucp, storeBackcupRecover.pl will
not use its functionality. There would be no need to do so, because no
special files could be backed up.
If you are using GNU/Linux based systems only, it is the best to forget this
option.
- --createSparseFiles / -s
- Creates sparse files from files
backuped as blocked files if full blocks are filled with zeros.
Heinz-Josef Claes
2014-04-20