Linux restore command
The Linux restore command is used to restore files or an entire filesystem (a partition) backed up by the dump operation.
The restore command performs the opposite operation of dump: dump backs up files, while restore writes those backed-up files back.
Syntax
restore [-cCvy][-b <区块大小>][-D <文件系统>][-f <备份文件>][-s <文件编号>] 或 restore [-chimvy][-b <区块大小>][-f <备份文件>][-s <文件编号>] 或 restore [-crvy][-b <区块大小>][-f <备份文件>][-s <文件编号>] 或 restore [-cRvy][-b <区块大小>][-D <文件系统>][-f <备份文件>][-s <文件编号>] 或 restore [chtvy][-b <区块大小>][-D <文件系统>][-f <备份文件>][-s <文件编号>][文件...] 或 restore [-chmvxy][-b <区块大小>][-D <文件系统>][-f <备份文件>][-s <文件编号>][文件...]
Parameters:
- -b
Set the block size, in bytes. - -c Do not check the backup format of the dump operation; only allow reading backup files that use the old format.
- -C Use comparison mode, comparing the backed-up files with the current files.
- -D
Allow the user to specify the name of the filesystem. - -f
Read backup data from the specified file and perform the restore operation. - -h Extract only the directory, not all the files associated with it.
- -i Use interactive mode; during the restore operation, the restore command prompts the user step by step.
- -m Extract the file or directory matching the specified inode number instead of specifying it by name.
- -r Perform the restore operation.
- -R When restoring an entire filesystem, specify where the check should start.
- -s
When the backup data spans more than one tape volume, you can specify the number of the backup file. - -t Specify filenames; if those files exist in the backup, list their names.
- -v Display the command execution process.
- -x Specify filenames and read them from the given storage medium; if those files exist in the backup, restore them into the filesystem.
- -y Do not ask any questions; always answer yes and continue executing the command.
Linux Command Reference