变态重口极致另类在线-波多久久夜色精品国产-波多野结衣在线观看一区-波多野结衣在线观看一区二区-污污的网站免费阅读-污污视频网址

當前位置:首頁文章首頁 IT學院 IT技術

利用bacula完成數據的備份恢復

作者:  來源:  發布時間:2012-2-16 8:52:38  點擊:

 
4.查看備份文件
[root@baculaserver etc]# ls -ls /home/webbak/
總計 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產生的卷組文件
 
六、bacula恢復文件
1. 利用差異備份進行完全恢復
[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
#從備份狀態看,JobID為1的為完全備份,JobID為3的為差異備份,因此只需恢復jobid為1和3的備份即可完全恢復
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 *                    #指定要恢復的文件或目錄,* 表所有
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端,顯示已經完全恢復
 
2. 利用恢復指定的文件
[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表示恢復指定的文件
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     #指定恢復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成功恢復
 
3. 增量備份的完全恢復
[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
#從備份狀態看,JobID為1的為完全備份,JobID為2的為第一個增量備份,如果2之前還有其他的增量備份,必須在此指定,才能完全恢復
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上已經完全恢復Jobid為2前所有的文件
 
七、bconsole中相關命名說明
1. status  查看director、client、storage 狀態。

Tags:

備份恢復
首頁 上一頁 [3] [4] [5] [6]  下一頁 尾頁

相關文章

文章評論

軟件按字母排列: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
主站蜘蛛池模板: 久久精品视频免费播放 | 亚洲视频二 | 日韩色视频 | 麻豆按摩| 日本欧洲亚洲一区在线观看 | 三级黄色片在线观看 | 黄色片一级毛片 | a级在线观看免费 | 国产男女自拍视频 | 性欧美video高清 | 免费看一毛一级毛片视频 | 色视频2 | 色婷婷婷丁香亚洲综合不卡 | 国产一区二区三区高清视频 | 天天舔天天射天天操 | 五月天丁香六月欧美综合 | 亚洲小视频网站 | 日本一区二区三区在线观看视频 | 欧美bbbbxxxx | 免费观看一级欧美在线视频 | 桃桃酱无缝丝袜在线播放 | 国产v国产v片大片线观看网站 | 香蕉乱码成人久久天堂爱免费 | 激情欧美一区二区三区中文字幕 | 国产盗摄一区二区欧美精品 | 国产制服 国产制服一区二区 | 亚洲午夜免费 | aaa在线观看高清免费 | 不卡福利 | 天天射天天射天天干 | 久久精品免视看国产成人2021 | 成年人免费观看网站 | 国产香蕉国产精品偷在线观看 | 蜜桃欧美性大片 | 亚洲欧美日韩国产专区一区 | 美女私密福利第一导航 | 在线观看免费黄色小视频 | 成人在线黄色 | 成人毛片免费观看 | 日本久久精品视频 | 成人免费视频大全 |