Backup points
Consideration of backup Data
Problems caused by system corruption:
Hardware problem: Hard Drive damage
Software problems: Accidental deletion, security attack,
Different host roles, different backup tasks
Backup factor considerations
Which files to back up
What backup device to choose
Consider how to backup
Frequency of backups
Tools used by Backup
What Linux data to back up
Files that have a backup meaning can usually be grouped into two broad categories:
1. system Basic Setup Information
2. Content data similar to network services
Files that the operating system itself needs to back up:
1./etc/Entire Directory
2./home Entire Directory
3./var/spool/mail
4./boot
5./root
6. If you have installed other kits, then/usr/local or/opt is also best to back up
Database aspects of network services
1. The software itself configuration file, for example:/etc/entire directory,/usr/local/entire directory
2. Data provided by software services, taking WWW and MySQL as examples
WWW data:/var/www The entire directory or/srv/www the entire directory, and the system's user home folder
Mysql:/var/lib/mysql Entire Directory
3. Other database files that provide services on Linux hosts
Recommended directories to back up
1./boot
2./etc
3./home
4./root
5./usr/local (or/opt and/srv, etc.)
6./var (Note: If there are some temporary directories in this directory can not be backed up)
Directories that do not need to be backed up
1./dev
2./proc
3./mnt and/media
4./tmp
Select Backup Device
Considerations for storage devices
Backup speed requirements: Think hard disk use
Storage Capacity: Tape backup considerations
Funding and data reliability: Use of DVDs can be kept for 10 years or so
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)
Removable hard disk:/dev/sd[a-p][1-16] (same as SCSI)
Printer:/dev/lp[0-2]
The type, frequency and tool selection of backup
How to back up:
1. Incremental backup
2. Differential backup
Incremental backup of full backups (incremental backup)
Considerations for reduction
Principles for Incremental backups
The so-called incremental backup, refers to the system after the first full backup, after a period of time to run, compare
The difference between the system and the backup file, and then the gold backs up the difference file.
Backup software used for incremental backups
Common tools for full backups are: DD, Cpio, Dupm/restore
Direct Incremental backup command: DUPM
DD IF=/DEV/SDA OF=/DEV/SDB
Find/-print | Cpio-covb >/dev/st0
Cpio-iduv </dev/st0
1. Full backup
Dump-0u-f/backupdata/home.dump/home
2. For the first time incremental backup
Dump-1u-f/backupdata/home.dump.1/home
Tar-exclude/proc--exclude/mnt--exclude/tmp
--exclude/backupdata-jcvp-f/backupdata/sys.tar.bz2
Differential backups for full backups (differential backup)
Differential backup values are: Each backup is the result of a comparison 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/(Mirror/home/to/backupdata/home/)
rsync-av/home/backupdata/(it will be much quicker to do it again, if the data has not changed, almost no action)
Critical Data Backup
TAR-JPCVF MySQL. ' Date +%y-%m-%d '. Tar.bz3/var/lib.mysql