Get the App
SLTechnology News&Howtos  ›  Servers  › 

Restore a backup using the restore command of linux

Shulou Source: shulou.com Published: 2022-06-02 16:15:18 11月15日 Update

This article will explain in detail about using linux's restore command to restore backups. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

The restore command is used to restore the file or the entire file system (a partition) backed up by the dump operation.

Syntax format: restore [parameters] [file]

Common parameters:

-b sets the block size, in units that Byte-c does not check the backup format for dump operations, and only allows reading of backup files using the old format-C uses comparison mode to compare backup files with current files-D allows the user to specify the name of the file system-f to read backup data from the specified file When performing a restore operation-h only undoes the directory and does not include all files related to that directory-I uses interactive mode, during the restore operation, the restore instruction asks the user in sequence-m to unlock files or directories that match the specified inode number instead of using the file name specified-r for a full restore of the file system, check where to start-s when backup data exceeds one tape You can specify the number of the backup file-t specify the file name, if the file already exists in the backup file, list their names-v display instruction execution process-x set the file name, and read them from the specified storage media, if the file already exists in the backup file, restore it to the file system-y without asking any questions, agree to answer and continue to execute the instruction

Reference example

Use the performed dump to perform a full rebuild:

[root@linuxcool ~] # restore  -rf   / dev/nst0  

Extract the   / etc   directory only from the tape backup:

[root@linuxcool ~] # restore  -xf   / dev/nst0   / etc  

Interactive restore:

[root@linuxcool ~] # restore  -if   / dev/nst0

Full reconstruction is agreed to be carried out:

[root@linuxcool] # restore-rfy / dev/nst0 about using linux's restore command to restore backups is shared here. I hope the above content can be helpful to you and learn more. If you think the article is good, you can share it for more people to see.

Tags: Files backups names directories systems commands instructions formats parameters data more patterns users tapes articles references checks good practical interactive Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Linux Huawei vpn Xiaomi