Ubuntu Backup System

Source: Internet
Author: User

Ubuntu backup system 1. the backup system www.2cto.com first becomes the root user: $ sudo su and then enters the root directory of the file system (of course, if you do not want to back up the entire file system, you can also enter the directory you want to back up, including remote directories or directories on mobile hard disks): # cd/the complete command I used to back up the system: # tar cvpzf backup. tgz-exclude =/proc-exclude =/lost + found-exclude =/backup. tgz-exclude =/mnt-exclude =/sys/command: "tar" is of course the program used by the backup system. "Cvpfz" is the tar option, which means "create a file", "retain Permissions" (Retain the original permissions for everything), and "use gzip to reduce the file size ". “Backup.gz "is the file name of the file to be obtained. "/" Is the directory to be backed up. Here it is the entire file system. -Exclude =/proc-exclude =/lost + found-exclude =/backup. tgz-exclude =/mnt-exclude =/sys/These are excluded. At the end of the Backup command, you may see the following prompt: 'tar: Error exit delayed from previous errors ', which can be ignored in most cases. You can also use Bzip2 to compress files. Complete command: # tar cvpjf backup.tar.bz2-exclude =/proc-exclude =/lost + found-exclude =/backup.tar.bz2-exclude =/mnt-exclude =/sys/2. restore the system 1. Switch to the root user and set the file "backup. "tgz" is copied to the root directory of the partition. If your system has crashed and cannot be started, you can use Live CD to start it. The effect is the same. Run the following command to restore the system: # tar xvpfz backup. tgz-C/if your file is compressed using Bzip2, use: # tar xvpfj backup.tar.bz2-C/Note: the preceding command overwrites all files in the partition with files in the archive file. At the end of the recovery command, your work is not completed yet. Don't forget to recreate the directories excluded during Backup: # mkdir proc # mkdir lost + found # mkdir mnt # mkdir sys, etc.

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.