CentOS backup policy
Backup points
Backup Data considerations
Problems that cause system damage:
Hardware problems: Hard Disk destruction
Software problems: accidental deletion, security attacks,
Different host roles and different backup tasks
Backup considerations
Backup Files
Select the backup device
Backup Methods
Backup Frequency
Backup tools
Linux Data Backup
Files with backup significance can be roughly divided into two categories:
1. Basic System settings
2. content data similar to Network Services
Files to be backed up by the operating system itself:
1./etc/entire directory
2./home the entire directory
3./var/spool/mail
4./boot
5./root
6. If you have installed other suites, You 'd better back up/usr/local or/opt.
Database of Network Services
1. configuration file of the software, for example:/etc/entire directory,/usr/local/entire directory
2. Take WWW and MySQL as an example for the data provided by the Software Service.
WWW Data:/var/www entire directory or/srv/www entire directory and main user folder of the system
MySQL:/var/lib/mysql directory
3. Other database files that provide services on Linux Hosts
Recommended directory to be backed up
1./boot
2./etc
3./home
4./root
5./usr/local (or/opt and/srv)
6./var (Note: if some temporary directories in this directory are not backed up)
Directories that do not need to be backed up
1./dev
2./proc
3./mnt and/media
4./tmp
Select Backup Device
Storage Device considerations
Backup speed requirement: hard disk usage
Storage Capacity: tape backup considerations
Funding and Data Reliability: Use of DVDs, which can be stored for about 10 years
Some common device codes:
Optical Drive:/dev/cdrom (in fact, it should be/dev/sdX or/dev/hdX)
Tape drive:/dev/st0 (SCSI interface),/dev/ht0 (IDE Interface)
Floppy disk drive:/dev/fd0,/dev/fd1
Hard Disk:/dev/hd [a-d] [1-16] (IDE),/dev/sd [a-p] [1-16] (SCSI/SATA)
Mobile hard drive:/dev/sd [a-p] [1-16] (same as SCSI)
Printer:/dev/lp [0-2]
Backup Types, frequencies, and tools
Backup method:
1. Incremental Backup
2. Differential backup
Incremental backup)
Restoration considerations
Incremental Backup principles
The so-called Incremental backup means that after the system completes the first full backup
The difference between the system and the backup file, and then there is only a golden backup file.
Backup Software Used for Incremental Backup
Common tools for complete backup include dd, cpio, dupm, and restore.
Command for direct Incremental Backup: dupm
Dd if =/dev/sda of =/dev/sdb
Find/-print | cpio-covB>/dev/st0
Cpio-iduv </dev/st0
1. Complete backup
Dump-0u-f/backupdata/home. dump/home
2. Incremental backup for the first time
Dump-1u-f/backupdata/home. dump.1/home
Tar-exclude/proc -- exclude/mnt -- exclude/tmp \
-- Exclude/backupdata-jcvp-f/backupdata/sys.tar.bz2
Differential backup)
The differential backup value is that each backup is compared with the original full backup.
Tar-n' 2009-06-01 '-jpcv-f/backupdata/home.tar.bz2/home
Rsync-av source directory target directory
Rsync-av/home/backupdata/(copy/home/image to/backupdata/home)
Rsync-av/home/backupdata)
Key data backup
Tar-jpcvf mysql. 'date has been y-w.m-mongod'.tar. bz3/var/lib. mysql