The simplest way to back up and restore the Ubuntu server system is to compress all the files in the/directory into a compressed package. What is needed is to decompress the package and overwrite it back. First, make sure it is the root user. Then run the command to package the files in the/directory [plain] tar cvpzf backup. tgz -- exclude =/proc -- exclude =/lost + found -- exclude =/backup. tgz -- exclude =/mnt -- exclude =/sys/cvpzf For details, refer to the help of the tar command. Here I will explain: www.2cto.com cf is used to create a tar file (f refers to an archive file, usually used for cf or zf). z refers to gzip compression and v refers to verbose. to list the creation process in detail, p indicates that the File Permission remains unchanged. Okay, my backup file backup. tgz has been created, 652 M. If you encounter any problems later, you can use the following command to restore them. [Plain] tar xvpfz backup. tgz-C/x indicates decompression, v, p, and z. -C: Decompress the file to the/directory. Reference: http://ubuntuforums.org/showthread.php? T = 35087