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.