1, the Linux system needs to back up the data
/root/Directory:
/home/directory:
/var/spool/mail/directory:
/etc/Directory: Other directories:
2, the installation of services data
Data that Apache needs to back up
configuration files, Web page home directories, log files
MySQL needs to back up the data = Source Package installed mysql:/usr/local/mysql/data/
RPM Package Installation of mysql:/var/lib/mysql/
3. Full backup, incremental backup, differential backup
(01), Backup command and dump [option] File name original file or directory after backup
Options:
-level: That's what we're talking about. 0-9 is a backup level
-F file Name: Specify the file name after backup
-U (Common): After the backup is successful, log the backup time in the/etc/dumpdates file
-V: Show more procedures
-j (Common): Call Bzlib Library Compressed backup file, in fact, is to compress the backup file into. bz2 format
-W: Displays the backup level and backup time of the partition allowing dump
Example: Backup partition
Dump-0uj-f/root/boot.bak.bz2/boot/
#备份命令. Perform a full backup first, and compress and update the backup time
Cat/etc/dumpdates
#查看备份时间文件
CP install.log/boot/
#复制日志文件到/boot partition
Dump-1uj-f/root/boot.bak1.bz2/boot/
#增量备份/boot partition, and compress dump–w #查询分区的备份时间及备份级别的
Example: Backing up a file or directory = = dump-0j-f [FileName]/root/etc.dump.bz2/etc/
#完全备份/etc/directory, use only 0 levels for full backups and no longer support incremental backups
(02), Restore command = restore [mode options] [options]
Mode options: There are four modes commonly used by the restore command, and these four modes cannot be mixed
-C: Compare backup data and actual data changes
-I: Enter interactive mode, manually select the files that need to be recovered
-T: view mode for viewing what data is in the backup file
-R: Restore Mode for data restore,
Options:
-F: Specifies the file name of the backup files
Linux Data Backup and recovery