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/01 Report--
This article focuses on "how to back up the Linux operating system", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to back up the Linux operating system.
Tar:
Characteristics.
1. Retain permissions
2. Suitable for backing up the entire directory
3. You can choose different compression methods.
4. If you choose not to compress, you can also achieve incremental backup and partial restore. Refer to man tar.
A backup
If you want to back up the / home directory and save the backup file in / backup (you can mount a separate partition here), the command is as follows: use uncompressed, fast
The following is a reference clip:
Tar-cpf / backup/home.bak.tar / home
Use gzip compression, the speed is average, usually use this
The following is a reference clip:
Tar-cpzf / backup/home.bak.tar.gz / home
Using bzip2 compression, the speed is slow, but about 5% smaller than the gzip version.
The following is a reference clip:
Tar-cpjf / hackup/home.bak.tar.bz2 / home
The second parameter is described as follows:
C New
P preserve permissions
Z is processed with gzip
J is processed with bzip2
F followed by file name
You can also add v to display the backup process on the terminal.
B reduction
The following is a reference clip:
Tar-overwrite-xpf / backup/home.bak.tar-C /
K3b (CD)
Characteristics.
Do everything by yourself and have a better choice of documents.
Backup, restore
There is nothing to say, use K3B to do their own CD, I am responsible for restoring the files to be restored.
Dd
Characteristics.
1. Operate on blocks and back up the entire hard disk (including partition tables, MBR, and other file systems that are not well supported by Linux)
2. It can be compressed (please)
3. Because the entire hard disk is backed up, the unused "blank" space on the file system will also be saved, and the backup file is relatively large.
Backup
Back up the hard disk sda and put it in / backup (/ backup is mounted on other hard drives such as sdb)
1. The simplest, no compression:
The following is a reference clip:
Dd if=/dev/sda of=/backup/sda.dd
2. Compress with gzip
The following is a reference clip:
Dd if=/dev/sda | gzip-c # > / backup/sda.dd.gz
Where # is replaced by the number 1-9, representing the fastest-smallest 3, respectively, and compressed with bzip2
The following is a reference clip:
Dd if=/dev/sda | bzip2-c # > / backup/sda.dd.bz2
Where # is replaced by the number 1-9, which represents the fastest-smallest, respectively.
If you want to see the progress, you can send a signal to dd SIGUSR1:
The following is a reference clip:
Killall-s SIGUSR1 dd
Reduction
The destination disk to be restored must be the same size as the original, otherwise the consequences will be very serious.
1. No compression
Dd if=/backup/sda.dd of=/dev/sda
2 、 gzip
Gzip-dc / backup/sda.dd.gz | dd of=/dev/sda
3 、 bzip
Bzip2-dc / backup/sda.dd.bz2 | dd of=/dev/sda
Ghost
Ghost runs under dos, and it is recommended to use the inaction DOS toolkit, something similar to the dos toolkit under win, for use under linux.
1. Contains ghost to back up ext3 partitions
two。 Use msdos7.1 3. Add shutdown and restart functions.
At this point, I believe you have a deeper understanding of "how to back up the Linux operating system". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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: 0
*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.