Home > Operation and Maintenance > CentOS > How to backup centos system

How to backup centos system

王林
Release: 2020-03-25 15:15:39
Original
3151 people have browsed it

How to backup centos system

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
Copy after login

or

tar cvpzf /state/partition1/home/backup.tgz / --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template