Siege Lion on the Way (iii) Linux (29)---Full backup tool: Dump and restore

Source: Internet
Author: User

One, the dump command:

This command can be backed up for the entire file system, or only for directories. You can also specify a different backup level ( -0~-9 a total of 10 levels).

Dump-w: Lists whether the partitions with the dump settings in/etc/fstab have been backed up.

Command format: Dump [-SUVJ] [-level] [-f backup file] data to be backed up

Parameter description:

-S: Lists only the amount of disk space needed to back up the data you want to back up.

-U: Log the time of this dump to the/etc/dumpdates file.

-V: Displays the file process of the dump.

-j: Added bzip2 support, data compression, the default bzip2 compression level is 2.

-level: Specifies the level, from -0~-9 a total of 10 levels.

-F: Similar to the-f parameter with tar.

1. Back up the complete file system with dump:

Dump-s/dev/sda1; <== View the disk capacity required for backup

Dump-0u-f/root/boot.dump/boot; <== backup, specifying a backup level of 0

Ll/root/boot.dump/etc/dumpdates; <== Verify that Dumpdates is updated

Dump-1u-f/root/boot.dump.1/boot; <== Create a new differential backup file.

2. Use dump to back up non-file systems, that is, a single directory method:

At this point, the-level 1-9 and-u are no longer applicable.

Dump-0j-f/root/etc.dump.bz2/etc;

Ii. Restore: Restoring commands

Since there is a backup, there will be a restore.

Restore-t [-F DumpFile] [-h] <== view dump file

Restore-c [-F dumpfile] [-D mount Point]; <== comparing dump with actual file

Restore-i [-F dumpfile]; <== into interactive mode

Restore-r [-F dumpfile]; <== restoring the entire file system

Parameter description: cannot be mixed

-T: Similar to the tar-t feature for viewing

-C: Compare the data in the dump with the actual file system

-I: Enter interactive mode, you can restore only some files

-R: Restore the entire file system

Other parameters:

-H: View information such as inode and label in full backup data

-F: Specify the dump file to be processed later

-D: Paired with-c

1. Use restore to view the contents of backup data after dump backup:

Restore-t-f/root/boot.dump;

2. Compare the differences and restore the entire file system:

Rsotre-c-f/root/boot.dump;

3, only restore the interactive mode of some files: I do not understand.

    

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.