- 1. 安卓批量安裝卸載備份恢復(fù)手機(jī)軟件 安卓軟件管家 v...
- 2. Sql數(shù)據(jù)庫自動(dòng)備份恢復(fù)助手(擁有友好的操作界面) ...
- 3. D8系統(tǒng)備份恢復(fù)專家(全面支持win xp,win 7和vista系...
- 4. 小哨兵一鍵恢復(fù)(新一代安全快速的系統(tǒng)備份恢復(fù)工具...
- 5. UC保險(xiǎn)箱S60V3(手機(jī)備份恢復(fù)工具) V1.0.0.1 簡體中...
- 6. UC保險(xiǎn)箱塞班第五版(手機(jī)備份恢復(fù)工具) V1.0.0.1 簡...
- 7. FBackup(簡單好用的文件備份恢復(fù)工具) V4.6.253 多...
- 8. ERUNTgui(注冊(cè)表備份恢復(fù)工具)免費(fèi)下載 V1.2.6
- 9. 雨過天晴電腦保護(hù)系統(tǒng)(極速電腦備份恢復(fù)軟件) V1...
- 10. 磁盤分區(qū)備份恢復(fù)軟件(OneKey Ghost) V6.5 中文免...
利用bacula完成數(shù)據(jù)的備份恢復(fù)
作者: 來源: 發(fā)布時(shí)間:2012-2-16 8:52:38 點(diǎn)擊:
4.查看備份文件
[root@baculaserver etc]# ls -ls /home/webbak/
總計(jì) 12
4 -rw-r----- 1 root root 825 02-15 23:37 db-2012-02-15-id2
4 -rw-r----- 1 root root 969 02-15 23:40 db-2012-02-15-id3
4 -rw-r----- 1 root root 900 02-15 23:30 webbak #label產(chǎn)生的卷組文件
六、bacula恢復(fù)文件
1. 利用差異備份進(jìn)行完全恢復(fù)
[root@balucaclient etc]# rm -rf /var/www/html/* #刪除fd中所有文件
[root@baculaserver etc]# ./bconsole
Connecting to Director 192.168.32.30:9101
1000 OK: 2012-02-15-dir Version: 5.0.1 (24 February 2010)
Enter a period to cancel a command.
*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 Job date
13: Cancel
Select item: (1-13): 3
Enter JobId(s), comma separated, to restore: 1,3
You have selected the following JobIds: 1,3
#從備份狀態(tài)看,JobID為1的為完全備份,JobID為3的為差異備份,因此只需恢復(fù)jobid為1和3的備份即可完全恢復(fù)
Building directory tree for JobId(s) 1,3 ...
3 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 * #指定要恢復(fù)的文件或目錄,* 表所有
5 files marked.
$ done
Storage "" not found, using Storage "dbsd" from MediaType "File".
Bootstrap records written to /usr/local/bacula/var/bacula/working/2012-02-15-dir.restore.1.bsr
The job will require the following
Volume(s) Storage(s) SD Device(s)
===========================================================================
webbak
db-2012-02-15-id3
Volumes marked with "*" are online.
5 files selected to be restored.
Automatically selected Client: 2012-02-15-fd
Run Restore job
JobName: Restoreweb
Bootstrap: /usr/local/bacula/var/bacula/working/2012-02-15-dir.restore.1.bsr
Where: *None*
Replace: always
FileSet: dbfs
Backup Client: 2012-02-15-fd
Restore Client: 2012-02-15-fd
Storage: dbsd
When: 2012-02-15 23:54:12
Catalog: MyCatalog
Priority: 10
Plugin Options: *None*
OK to run? (yes/mod/no): yes
Job queued. JobId=4
[root@balucaclient etc]# ls /var/www/html/
index1.html index2.html index3.html
#查看fd端,顯示已經(jīng)完全恢復(fù)
2. 利用恢復(fù)指定的文件
[root@balucaclient etc]# rm -rf /var/www/html/*
[root@baculaserver etc]# ./bconsole
*restore
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 Job date
13: Cancel
Select item: (1-13): 7 #7表示恢復(fù)指定的文件
Automatically selected Client: 2012-02-15-fd
Enter file names with paths, or < to enter a filename
containing a list of file names with paths, and terminate
them with a blank line.
Enter full filename: /var/www/html/index2.html #指定恢復(fù)index2.html文件
Enter full filename:
Storage "" not found, using Storage "dbsd" from MediaType "File".
Bootstrap records written to /usr/local/bacula/var/bacula/working/2012-02-15-dir.restore.2.bsr
The job will require the following
Volume(s) Storage(s) SD Device(s)
===========================================================================
db-2012-02-15-id3
Volumes marked with "*" are online.
1 file selected to be restored.
Run Restore job
JobName: Restoreweb
Bootstrap: /usr/local/bacula/var/bacula/working/2012-02-15-dir.restore.2.bsr
Where: *None*
Replace: always
FileSet: dbfs
Backup Client: 2012-02-15-fd
Restore Client: 2012-02-15-fd
Storage: dbsd
When: 2012-02-16 00:03:19
Catalog: MyCatalog
Priority: 10
Plugin Options: *None*
OK to run? (yes/mod/no): yes
Job queued. JobId=5
[root@balucaclient etc]# ls /var/www/html/
index2.html
#顯示fd上index2.html成功恢復(fù)
3. 增量備份的完全恢復(fù)
[root@balucaclient etc]# rm -rf /var/www/html/*
[root@baculaserver etc]# ./bconsole
Connecting to Director 192.168.32.30:9101
1000 OK: 2012-02-15-dir Version: 5.0.1 (24 February 2010)
Enter a period to cancel a command.
*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 Job date
13: Cancel
Select item: (1-13): 3
Enter JobId(s), comma separated, to restore: 1,2
You have selected the following JobIds: 1,2
#從備份狀態(tài)看,JobID為1的為完全備份,JobID為2的為第一個(gè)增量備份,如果2之前還有其他的增量備份,必須在此指定,才能完全恢復(fù)
2 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 *
4 files marked.
$ done
Storage "" not found, using Storage "dbsd" from MediaType "File".
Bootstrap records written to /usr/local/bacula/var/bacula/working/2012-02-15-dir.restore.3.bsr
The job will require the following
Volume(s) Storage(s) SD Device(s)
===========================================================================
webbak
db-2012-02-15-id2
Volumes marked with "*" are online.
4 files selected to be restored.
Automatically selected Client: 2012-02-15-fd
Run Restore job
JobName: Restoreweb
Bootstrap: /usr/local/bacula/var/bacula/working/2012-02-15-dir.restore.3.bsr
Where: *None*
Replace: always
FileSet: dbfs
Backup Client: 2012-02-15-fd
Restore Client: 2012-02-15-fd
Storage: dbsd
When: 2012-02-16 00:08:05
Catalog: MyCatalog
Priority: 10
Plugin Options: *None*
OK to run? (yes/mod/no): yes
Job queued. JobId=6
[root@balucaclient etc]# ls /var/www/html/
index1.html index2.html
#顯示fd上已經(jīng)完全恢復(fù)Jobid為2前所有的文件
七、bconsole中相關(guān)命名說明
1. status 查看director、client、storage 狀態(tài)。
Tags:
備份恢復(fù)上一篇:vps/lnmp,debian下安裝sendmail組件 下一篇:
[收藏此文章]