Used to back up ext2 or ext3 file systems
dump command is used to backup ext2 or ext3 file system. Directories or entire file systems can be backed up to a specified device, or to a large file.
dump(option)(parameter)
-0123456789: Backup level;
-b<block size>: Specify the block size in KB;
-B<Number of blocks>: Specifies the number of blocks in the backup volume;
-c: Modify the default density and capacity of the backup tape;
-d<density>: Set the density of the tape. The unit is BPI;
-f<device name>: Specify the backup device;
-h<level>: When the backup level is equal to or greater than the specified level, files marked as "nodump" by the user will not be backed up;
-n: When the backup job requires administrator intervention, send a notification to all users in the "operator" group;
-s<tape length>: the length of the backup tape, in feet;
-T<date>: Specify the time and date of backup;
-u: After the backup is completed, record the backup file system, level, date and time in /etc/dumpdates;
-w: Similar to -W, but only displays files that need to be backed up;
-W: Display the files that need to be backed up and the level, time and date of their last backup.
Backup source: Specify the files, directories or file systems to be backed up.
Back up all the contents of the /home
directory to the /tmp/homeback.bak
file. The backup level is 0
and record relevant information in /etc/dumpdates
:
dump -0u -f /tmp/homeback.bak /home
Back up all the contents of the /home
directory to the /tmp/homeback.bak
file. The backup level is 1
(only the data that has changed since the last backup using level 0
is backed up) and in /etc Record relevant information in /dumpdates
:
dump -1u -f /tmp/homeback.bak /home
Through the backup level of the dump command, full + incremental backup, full + differential backup can be achieved, and unattended backup can be achieved with crontab.