In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
1. backup system
How do I backup my Ubuntu system? It's simple, just like you backup or compress anything else, use TAR. Unlike Windows, Linux does not restrict root access to anything, you can throw everything on a partition into a TAR file!
First become root user:
$ sudo su
Then go to the root directory of the file system (of course, if you don't want to back up the entire file system, you can also go to the directory you want to back up, including remote directories or directories on the removable hard disk):
# cd /
Here is 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 description:
"tar" is, of course, the program we use to back up our system.
"cvpfz" is tar's option, meaning "create archive file,""keep permissions"(keep everything original permissions),"use gzip to reduce file size."
"backup.gz" is the file name of the archive file we are going to get.
"/" is the directory we want to back up, in this case the entire file system.
Directories that must be excluded for backup are given between the archive file name "backup.gz" and the directory name "/" to be backed up. Some directories are useless, such as "/proc,""/lost+ found," and "/sys."
Of course, the archive file "backup.gz" itself must be excluded, otherwise you may get some unusual results. If "/mnt" is not excluded, then other partitions mounted on "/mnt" will also be backed up. In addition, you need to make sure that there is nothing mounted on "/media"(such as CD, removable hard disk). If there is something mounted, you must exclude "/media".
Make sure you type the command you want before executing the backup command. It may take a long time to execute the backup command.
After the backup is complete, a file named "backup.tgz" is generated in the root directory of the file system, and its size may be very large. Now you can burn it to DVD or put it somewhere you think is safe.
At the end of the backup command you may see a prompt like 'tar: Error exit delayed from previous errors', which you can ignore in most cases.
You can also compress files with Bzip2, which has a higher compression ratio than gzip but is slower. If compression is important to you, you should use Bzip2, replace the "z" with "j" in the command, and give the archive the correct extension "bz2." The complete command is as follows:
# tar cvpjf backup.tar.bz2 -exclude=/proc -exclude=/lost+found -exclude=/backup.tar.bz2 -exclude=/mnt -exclude=/sys /
The above is how linux system backup details, more please pay attention to other related articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 205
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.