日韩精品中文字幕一区二区-日韩精品中文字幕一区-日韩精品中文字幕视频-日韩精品在线一区二区三区-第一页在线-第一福利视频

當前位置:首頁文章首頁 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
主站蜘蛛池模板: 女同性恋视频网站| 少女频道电影在线观看中文版| 变态的视频| 诗歌繁星| 格什温| 梦想建筑师泰国百合剧| 范瑞君| 性感的女朋友| 植树看图写话| 樱花悠| 同性恋免费观看| 相识电影| 最贵的烟前十名| 爱,藏起来 电影| 超薄轻舞玉女女裤广场舞| 法医秦明之幸存者 2018 经超 | 中国未来会黑人化吗| 龟兔赛跑的故事视频| 台州林毅| 十八岁在线观看| 黑凤凰电视剧剧情介绍| 1987年美国电影| 日本午夜电影| 妻子的电影| psv游戏| 崔维斯·费米尔| 四查四看自我剖析材料| 手机在线观看电影网| 拉雅| 《风流艳妇》| 看黄在线看| 康熙微服私访记第二部演员表| 南来北往老婆别哭100集 | 97理伦| 郑中基的电影全部作品| 玫瑰的故事图片| 团结就是力量歌词电子版| 婚前婚后电影高清完整版| 兔子先生第四季在线观看| 小学道法教研主题10篇| 小矮人的一级毛片|