You can use tar backup, the method is as follows:
1. Use the root user to switch to the root directory;
2. Then, use the following command Back up the complete system:
tar cvpzf backup.tgz / --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys
or
tar cvpzf /state/partition1/home/backup.tgz / --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys
Features of this method:
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, please refer to man tar.
Recommended tutorial: centos tutorial
The above is the detailed content of How to backup centos system. For more information, please follow other related articles on the PHP Chinese website!