Data backup-dump

Source: Internet
Author: User

Data backup-a large amount of data is operated in the dump data center. This is a disaster when it is damaged. At this time, you need to back up the data to restore it. It is useless to back up a large amount of data in a timely manner. Backup is certainly not a waste of time. You may be lucky to have never experienced data loss. However, since this kind of thing rarely happens and data integrity is very important, it seems that there is no problem to "save time" and resources by skipping backups. However, data center backup is very important. IT practitioners believe in the value of backup and do their best to make appropriate backup. Full backup full backup means full backup of business data. For example, on Monday, a tape is used to back up the entire business system, and on Tuesday, another tape team is used to back up the entire business system. Advantage: when data is lost, all the lost data can be restored with a single tape. The disadvantage is that full data backup every day can result in a large amount of data duplication, occupying a large amount of tape space and increasing the backup cost. If the data volume is large, the backup time is also relatively long. Incremental backup means that after a full backup or the last Incremental backup, each subsequent backup only needs to back up the files that have been added and modified compared with the previous one. This means that the object for the first Incremental backup is the Files Added and modified after full backup; the object of the second Incremental backup is the Files Added and modified after the first Incremental backup. The advantage is that there is no duplicate backup data, so the backup data volume is not large and the backup time is short. Disadvantages: Incremental backup data recovery is troublesome. Must have the last full backup and all Incremental backup tapes (once one of the tapes is lost or damaged, the recovery will fail ), they must be restored one by one in the chronological order from full backup to Incremental backup, which greatly prolongs the recovery time. Differential backup is a complete backup method. For example, the system administrator backs up the system completely on Sunday, backs up data from Sunday to Monday on Monday, backs up data between Sunday and Tuesday on Tuesday, and so on. Advantages: it avoids the defects of the above two backup policies and has the advantages of both. You do not need to perform full backup on the system every day. Therefore, the backup data volume is small and the backup time is short, so it is not necessary to save disk space. Second, it is also very convenient to recover data. You only need two backups, that is, full backup and one day before disaster occurrence. Advantages of using dump for dump Backup 1. Backup can be performed across multiple volumes of tape; 2. Backup can be any type of file, or even a device. 3. File Permissions during Backup, the owner, group, modification time, and so on will be saved; 4. The file blocks that never contain any data can be correctly processed; 5. Incremental backup and differential backup can be performed. Install dump [root @ localhost ~] # Basic usage of yum install-y dump-level-u-f backup file name the level of the object to be backed up indicates the backup level, 0 indicates full backup; 1, it indicates the difference between the current and 0, and 2 indicates the difference between the current and 1. The backup file system can use 0-9, while the backup folder can only use 0. if you select level 0 for full backup during Incremental Backup every day, then you can use the same level greater than 0 every day. If you select 1, you will always use 1. -U records the backup time to the/etc/dumpuodates file. If you want to use an incremental or differential backup solution, you must use the-u option, if the backup folder cannot use the u option-f to specify the file-j generated by the backup or-z compressed backup full backup dump-0u-f/tmp/baskup/full. dmp/tmp/test Incremental backup dump-1u-f/tmp/backup/add_001.dmp/tmp/test dump-2u-f/tmp/backup/add_002.dmp/tmp/test file and restore command restore-t to view the content in the backup file-r to view or restore the entire file system-f to view or restore the backup file [root @ localhost test] # dump-0u -f/test/boot. dump/boot DUMP: Date of this level 0 dump: Tue Oct 8 08:57:45 2013 DUMP: Dumping/dev/vda1 (/boot) to/test/boot. dump DUMP: Label: none ........................ DUMP: Volume 1 transfer rate: 18880 kB/s DUMP: 18880 blocks (18.44 MB) on 1 volume (s) DUMP: finished in 1 seconds, throughput 18880 kBytes/sec DUMP: date of this level 0 dump: Tue Oct 8 08:57:45 2013 DUMP: Date this dump completed: Tue Oct 8 08:57:46 2013 DUMP: Average transfer rate: 18880 kB/s DUMP: dump is done [root @ localhost test] # cd/etc/[root @ localhost etc] # cp passwd shadow/boot/[root @ loc Alhost etc] # cd/boot/[root @ localhost boot] # using System. map-2.6.32-71.el6.x86_64vmlinuz-2.6.32-71.el6.x86_64 [root @ localhost boot] # dump-u1-f/test/add_001.dump/boot create several more files, then back up [root @ localhost boot] # touch test1 [root @ localhost boot] # touch test2 [root @ localhost boot] # touch Test3 [root @ localhost boot] # touch test4 [root @ localhost boot] # touch test5 [root @ localhost boot] # using System. map-2.6.32-71.el6.x86_64test1test2test3test4test5vmlinuz-2.6.32-71.el6.x86_64 [root @ localhost boot] # dump-u2-f/test/add_002.dump/boot [root @ localhost boot] # cd/test/[roo T @ localhost test] # lsadd_001.dump add_002.dump boot. dump uses the command restore to view the content in the backup file [root @ localhost test] # restore-tf/test/boot. dump Dump date: Tue Oct 8 08:57:45 2013 Dumped from: the epochLevel 0 dump of/boot on localhost. localdomain:/dev/vda1Label: none 2. 11. /lost + found 65025. /grub 65031. /grub. conf 65026. /grub/splash.xpm.gz 65032. /grub/menu. the lst 65033. /grub/device. map 65034. /grub/sta Ge1 65035. /grub/stage2 65036. /grub/e2fs_stage00005 65037. /grub/fat_stage1_5 65038. /grub/ffs_stage1_5 65039. /grub/iso9660_stage00005 65040. /grub/jfs_stage00005 65041. /grub/minix_stage1_5 65042. /grub/reiserfs_stage1_5 65043. /grub/ufs2_stage00005 65044. /grub/vstafs_stage00005 65045. /grub/xfs_stage00005 65027. /efi 65028. /efi/EFI 65029. /efi/EFI/redhat 65030. /efi/EFI/redhat/grub. efi 12. /. vmlinuz-2.6. 32-71.el6.x86_64.hmac 13. /System. map-2.6.32-71.el6.x86_64 14. config-2.6.32-71.el6.x86_64 15. symvers-2.6.32-71.el6.x86_64.gz 16. /vmlinuz-2.6.32-71.el6.x86_64 17. /initramfs-2.6.32-71.el6.x86_64.img [root @ localhost test] # restore-tf/test/add_001.dump Dump date: Tue Oct 8 09:00:42 2013 Dumped from: tue Oct 8 08:57:45 2013 Level 1 dump of/boot on localhost. localdomain:/dev/vda1Label: none 2. 18. /passwd 19. /shadow [root @ localhost test] # restore-tf/test/add_002.dump view Incremental Backup content Dump date: Tue Oct 8 09:02:58 2013 Dumped from: tue Oct 8 09:00:42 2013 Level 2 dump of/boot on localhost. localdomain:/dev/vda1Label: none 2. 20. /test1 21. /test2 22. /test3 23. /test4 24. /test5 now I have deleted all my/boot/files, try to recover [root @ localhost test] # rm-rf/boot/* Delete all files [root @ localhost test] # cd/boot/[root @ local Host boot] # ls [root @ localhost boot] # recover data [root @ localhost boot] # restore-rf/test/boot. dump first restores to full backup [root @ localhost boot] # recovery System. map-2.6.32-71.el6.x86_64vmlinuz-2.6.32-71.el6.x86_64 [root @ localhost boot] # restore-rf/test/add_001.dump restore the first Incremental Backup [root @ localhost boot] # ls Using System. map-2.6.32-71.el6.x86_64vmlinuz-2.6.32-71.el6.x86_64 [root @ localhost boot] # restore-rf/test/add_002.dump restore second Incremental Backup [root @ localhost boot] # lsconfig-2.6.32-71.el6.x86_64efigrubinitramfs-2.6.32-71.el6.x86_64.imglost + foundpasswdrestoresymtableshadowsymvers-2. 6.32-71.el6.x86_64.gz System. map-2.6.32-71.el6.x86_64test1test2test3test4test5vmlinuz-2.6.32-71.el6.x86_64 so that you can achieve the most basic full and Incremental backup, of course, restore data can also be achieved to restore the backup file in part of the file function, that is, the restore interactive mode, this, the lab will be completed later.

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.