Ubuntu system backup and recovery

Source: Internet
Author: User
To back up Windows systems, you need to use Ghost. It is much simpler to back up Ubuntu. You can use the tar command. I can see a method on the Internet, but there is no actual test validity yet. (Make sure that nothing is mounted under/media, and the backup file will be placed under your root directory) sudosucd/tarcvpzfbackup. tgz/-- exclude =/proc -- exclude =/lost + found -- exclude =/backup. to back up Windows systems, you need to use Ghost. It is much simpler to back up Ubuntu. You can use the tar command. I can see a method on the Internet, but there is no actual test validity yet.

(Make sure that nothing is mounted under/media, and the backup file will be placed under your root directory)
Sudo su
Cd/
Tar cvpzf backup. tgz/-- exclude =/proc -- exclude =/lost + found -- exclude =/backup. tgz -- exclude =/mnt -- exclude =/sys

-- Exclude is used to exclude

If you want a higher compression ratio (slow speed)

Replace the code in the last step with this:
Tar cvpjf backup.tar.bz2/-- exclude =/proc -- exclude =/lost + found -- exclude =/backup.tar.bz2 -- exclude =/mnt -- exclude =/sys

There is a backup. tgz under your root directory. This is your backup file.

Recovery (with caution, all files in your partition will be replaced with files in the compressed file)
Sudo su
Cd/
Tar xvpfz backup. tgz-C/

If you use 2nd backup methods, replace the last code
Tar xvpfj backup.tar.bz2-C/

Wait until it is done
Mkdir proc
Mkdir lost + found
Mkdir mnt
Mkdir sys

Restart.
Related Article

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.