2、通过增量备份进行完全恢复
执行下面操作前需要先删除FD端的备份目录。
*status Status available for: 1: Director 2: Storage 3: Client 4: All Select daemon type for status (1-4): 1 f10-64-build-dir Version: 3.0.2 (18 July 2009) x86_64-unknown-linux-gnu RedHat Daemon started 21-Aug-09 15:01, 2 Jobs run since started. Heap: heap=253,952 smbytes=100,693 max_bytes=223,457 bufs=280 max_bufs=312 Scheduled Jobs: Level Type Pri Scheduled Name Volume ======================================================================= Incremental Backup 10 21-Aug-09 23:05 Client1 cicro4 Incremental Backup 10 21-Aug-09 23:05 Client cicro4 Incremental Backup 10 21-Aug-09 23:05 BackupCatalog cicro4 Running Jobs: Console connected at 21-Aug-09 16:32 Console connected at 21-Aug-09 16:50 No Jobs running. Terminated Jobs: JobId Level Files Bytes Status Finished Name ==================================================================== 65 1 0 OK 19-Aug-09 16:58 RestoreFiles 66 2 38.77 K OK 19-Aug-09 16:59 RestoreFiles 67 Full 25 145.5 M OK 21-Aug-09 13:41 Client1 68 Incr 2 3.908 M OK 21-Aug-09 14:20 Client1 69 Full 26 149.4 M OK 21-Aug-09 14:32 Client 70 Diff 2 3.908 M OK 21-Aug-09 14:34 Client 71 Diff 3 7.817 M OK 21-Aug-09 14:35 Client 72 Diff 4 11.72 M OK 21-Aug-09 14:35 Client 73 Incr 4 11.72 M OK 21-Aug-09 15:34 Client1 74 29 4.092 G OK 21-Aug-09 16:35 RestoreFiles *restore Automatically selected Catalog: MyCatalog Using Catalog "MyCatalog" First you select one or more JobIds that contain files to be restored. You will be presented several methods of specifying the JobIds. Then you will be allowed to select which files from those JobIds are to be restored. To select the JobIds, you have the following choices: 1: List last 20 Jobs run 2: List Jobs where a given File is saved 3: Enter list of comma separated JobIds to select 4: Enter SQL list command 5: Select the most recent backup for a client 6: Select backup for a client before a specified time 7: Enter a list of files to restore 8: Enter a list of files to restore before a specified time 9: Find the JobIds of the most recent backup for a client 10: Find the JobIds for a backup for a client before a specified time 11: Enter a list of directories to restore for found JobIds 12: Select full restore to a specified JobId 13: Cancel Select item: (1-13): 3 Enter JobId(s), comma separated, to restore: 67,68,73 You have selected the following JobIds: 67,68,73 #在这里,JobId为67的备份是一个完全备份,而JobId为68地备份为第一个增量 #备份,JobId为73的备份为第二个增量备份,如果还有其他增量备份,都要在 #这里指定,才能完全恢复 Building directory tree for JobId(s) 67,68,73 ... 26 files inserted into the tree. You are now entering file selection mode where you add (mark) and remove (unmark) files to be restored. No files are initially added, unless you used the "all" keyword on the command line. Enter "done" to leave this mode. cwd is: / $ mark cicro #标记恢复 29 files marked. $ done #确认操作 Bootstrap records written to /opt/bacula/var/bacula/working/f10-64-build-dir.restore.2.bsr The job will require the following Volume(s) Storage(s) SD Device(s) ======================================================================= cicro4 dbsd dbdev Volumes marked with "*" are online. 29 files selected to be restored. Defined Clients: 1: dbfd 2: dbfd1 Select the Client (1-2): 1 Run Restore job JobName: RestoreFiles Bootstrap: /opt/bacula/var/bacula/working/f10-64-build-dir.restore.2.bsr Where: /tmp/bacula-restores Replace: always FileSet: dbfs Backup Client: dbfd Restore Client: dbfd Storage: dbsd When: 2009-08-21 16:52:04 Catalog: MyCatalog Priority: 10 Plugin Options: *None* OK to run? (yes/mod/no): mod Parameters to modify: 1: Level 2: Storage 3: Job 4: FileSet 5: Restore Client 6: When 7: Priority 8: Bootstrap 9: Where 10: File Relocation 11: Replace 12: JobId 13: Plugin Options Select parameter to modify (1-13): 9 Please enter path prefix for restore (/ for none): / Run Restore job JobName: RestoreFiles Bootstrap: /opt/bacula/var/bacula/working/f10-64-build-dir.restore.2.bsr Where: Replace: always FileSet: dbfs Backup Client: dbfd Restore Client: dbfd Storage: dbsd When: 2009-08-21 16:52:04 Catalog: MyCatalog Priority: 10 Plugin Options: *None* OK to run? (yes/mod/no): yes Job queued. JobId=75
至此,增量备份的完全恢复也完成了,由此可以看出增量备份的恢复与差异备份恢复之间的差异。