An instance of a common backup system parameter in Linux
Source: Internet
Author: User
In Linux, there are many important directories on the instance system with common backup system parameters that need to be backed up. In fact, we do not recommend that you store the backup data in the/root directory! Assume that you already know the following important directories:/etc/(Configuration File)/home/(make...
In Linux, there are many important directories on the instance system with common backup system parameters that need to be backed up. In fact, we do not recommend that you store the backup data in the/root directory! Suppose you already know the following important directories:/etc/(Configuration File)/home/(user's home directory)/var/spool/mail/(in the system, email addresses of all accounts)/var/spool/cron/(configuration files for all accounts)/root (home directory of the system administrator) and then we know that, /home/loop * does not need to be backed up, and the compression files under/root do not need to be backed up. In addition, assume that you want to place the backup data to/backups, and this directory only has the root permission to access! In addition, the file names for each backup need to be different, such as using a file name such as a backup-system-20091130.tar.bz2 for processing. So how do you deal with this backup data? Www.2cto.com Ruby code #1. handle the directory and permissions for storing backup data first: [root @ www ~] # Mkdir/backups [root @ www ~] # Chmod 700/backups [root @ www ~] # Ll-d/backups drwx ------ 2 root 4096 Nov 30/backups www.2cto.com #2. suppose today is 2009/11/30, the backup method is as follows: [root @ www ~] # Tar-jcv-f/backups/backup-system-20091130.tar.bz2 \> -- exclude =/root /*. bz2 -- exclude =/root /*. gz -- exclude =/home/loop * \>/etc/home/var/spool/mail/var/spool/cron/root .... (process omitted ).... [root @ www ~] # Ll-h/backups/-rw-r -- 1 root 8.4 M Nov 30 backup-system-20091130.tar.bz2
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.