Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux backup, restore command

2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

The Linux dump command is used to back up the file system.

Dump is a backup utility program that backs up a directory or entire file system to a specified device or to a large file.

Grammar

Dump [- cnu] [- 0123456789] [- b] [- B] [- d] [- f] [- h] [- s] [- T] [directory or file system] or dump [- wW]

-0123456789 backup level

-c change tape density and capacity

-n administrator settin

-u record the level, date, time and other files / etc/dumpdates of the file system after recording

-w displays the files to be backed up

-W displays the backup file and the latest backup level, time, and date

-b specify block size

-B specify the number of blocks

-d set tape density

-f specify equipment

-h set backup level

-s specifies the tape length

-T specifies the backup date

Column: back up all files in the / usr/local/nginx directory to the / back directory and name it nginx.back.gz2

Dump-0ju-f / back/nginx.back.g2 / usr/local/nginx

Restore

Function description: Restore the file or the entire file system (a partition) backed up by the Dump operation.

Syntax: restore [- cCvy] [- b] [- D] [- f] [- s] or restore [- chimvy] [- b] [- f] [- s] or restore [- crvy] [- b] [- f] [- s] or restore [- cRvy] [- b] [- D] [- f] [- s] or restore [chtvy] [- b] [- D] [- f] [- s]. Or restore [- chmvxy] [- b] [- D] [- f] [- s] [file.]

Additional note: the operation performed by the restore instruction is the opposite of the dump directive. The dumping operation can be used to back up files, while the restore operation is to write back these backed up files.

Parameters:

-b sets the chunk size in Byte.

-c does not check the backup format of the dump operation and is only allowed to read backup files that use the old format.

-C uses comparison mode to compare backed-up files with current files.

-D allows the user to specify the name of the file system.

-f reads backup data from the specified file for restore operation.

-h unlocks only the directory and does not include all files related to that directory.

-I use interactive mode, and during the restore operation, the restore instruction will ask the user in order.

-m unlock files or directories that match the specified inode number instead of using the file name.

-r performs the restore operation.

-R when fully restoring the file system, where should the check begin.

When the backup data exceeds one tape, you can specify the number of the backup file.

-t specifies the names of the files and lists their names if they already exist in the backup file.

-v shows the instruction execution process.

-x sets the file name and reads them from the specified storage media, and restores the file to the file system if it already exists in the backup file.

-y do not ask any questions, agree to answer and continue to execute the instructions.

Column: restore-r [- f dumpfile]

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report