- 1. 安卓批量安装卸载备份恢复手机软件 安卓软件管家 v...
- 2. Sql数据库自动备份恢复助手(拥有友好的操作界面) ...
- 3. D8系统备份恢复专家(全面支持win xp,win 7和vista系...
- 4. 小哨兵一键恢复(新一代安全快速的系统备份恢复工具...
- 5. UC保险箱S60V3(手机备份恢复工具) V1.0.0.1 简体中...
- 6. UC保险箱塞班第五版(手机备份恢复工具) V1.0.0.1 简...
- 7. FBackup(简单好用的文件备份恢复工具) V4.6.253 多...
- 8. ERUNTgui(注册表备份恢复工具)免费下载 V1.2.6
- 9. 雨过天晴电脑保护系统(极速电脑备份恢复软件) V1...
- 10. 磁盘分区备份恢复软件(OneKey Ghost) V6.5 中文免...
利用bacula完成数据的备份恢复
作者: 来源: 发布时间:2012-2-16 8:52:38 点击:
2. 在客户端启动bacula的File Daemon
[root@baculaserver etc]#/usr/local/bacula/etc/bacula {start|stop|restart|status}
[root@baculaserver etc]#/usr/local/bacula/etc/bacula-fd {start|stop|restart|status}
#由于baculaclient只做fd端,在此只需启动bacula-fd服务即可
五、bacula备份文件
1. 创建卷组
[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.
*label #创建一个卷组
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
Automatically selected Storage: dbsd
Enter new Volume name: webbak #卷组名称,可随意指定,指定完毕后,会在bacula-dir.conf中Device逻辑字段指定的/home/webbak下生成一个文件
Automatically selected Pool: dbpool
Connecting to Storage daemon dbsd at 192.168.32.30:9103 ...
Sending label command for Volume "webbak" Slot 0 ...
3000 OK label. VolBytes=202 DVD=0 Volume="webbak" Device="dbdev" (/home/webbak)
Catalog record for Volume "webbak", Slot 0 successfully created.
Requesting to mount dbdev ...
3906 File device "dbdev" (/home/webbak) is always mounted.
You have messages.
#只有在使用磁带卷时才需要这样,而像我们刚才使用的磁盘卷,Bacula是可以自动进行label的。想要删除测试数据的话,就将/tmp目录下的卷直接删除,再使用drop_mysql_tables和make_mysql_tables脚本
2. 执行备份
2.1 第一次增量备份,默认会是一个完全备份 #备份前fd中文件有index1.html
*run
A job name must be specified.
The defined Job resources are:
1: webjob
2: Restoreweb
Select Job resource (1-2): 1 #选择备份任务
Run Backup job
JobName: webjob
Level: Incremental
Client: 2012-02-15-fd
FileSet: dbfs
Pool: dbpool (From Job resource)
Storage: dbsd (From Job resource)
When: 2012-02-15 23:29:58
Priority: 10
OK to run? (yes/mod/no): yes
Job queued. JobId=1
#到处为止,可以开始备份了,在bacula-dir.conf文件中定义的webjob是一个增量备份,因此这个备份只是一个增量操作,由于是第一个备份,因此默认webjob会做一个完全备份,第二次备份时才执行增量备份
2.2 第二次增量备份,只做增量操作 #备份前fd中文件有index1.html、index2.html
*run
A job name must be specified.
The defined Job resources are:
1: webjob
2: Restoreweb
Select Job resource (1-2): 1
Run Backup job
JobName: webjob
Level: Incremental
Client: 2012-02-15-fd
FileSet: dbfs
Pool: dbpool (From Job resource)
Storage: dbsd (From Job resource)
When: 2012-02-15 23:37:00
Priority: 10
OK to run? (yes/mod/no): yes
Job queued. JobId=2
#这是第二备份,只做一个增量操作
2.3 第三次备份,手动改为差异备份 #备份前fd中文件有index1.html、index2.html 、index3.html
*run
A job name must be specified.
The defined Job resources are:
1: webjob
2: Restoreweb
Select Job resource (1-2): 1
Run Backup job
JobName: webjob
Level: Incremental
Client: 2012-02-15-fd
FileSet: dbfs
Pool: dbpool (From Job resource)
Storage: dbsd (From Job resource)
When: 2012-02-15 23:40:15
Priority: 10
OK to run? (yes/mod/no): mod #mod修改备份任务参数
Parameters to modify:
1: Level
2: Storage
3: Job
4: FileSet
5: Client
6: When
7: Priority
8: Pool
9: Plugin Options
Select parameter to modify (1-9): 1 #1表示选择备份类别
Levels:
1: Full
2: Incremental
3: Differential
4: Since
5: VirtualFull
Select level (1-5): 3 #3表示差异备份
Run Backup job
JobName: webjob
Level: Differential
Client: 2012-02-15-fd
FileSet: dbfs
Pool: dbpool (From Job resource)
Storage: dbsd (From Job resource)
When: 2012-02-15 23:40:15
Priority: 10
OK to run? (yes/mod/no): yes
Job queued. JobId=3
3. 查看备份状态
*status
Status available for:
1: Director
2: Storage
3: Client
4: All
Select daemon type for status (1-4): 1
2012-02-15-dir Version: 5.0.1 (24 February 2010) i686-pc-linux-gnu redhat Enterprise release
Daemon started 15- 212 23:05, 3 Jobs run since started.
Heap: heap=258,048 smbytes=65,799 max_bytes=113,185 bufs=204 max_bufs=231
Scheduled Jobs:
Level Type Pri Scheduled Name Volume
===================================================================================
Differential Backup 10 16- 212 07:00 webjob *unknown*
====
Running Jobs:
Console connected at 15- 212 23:40
No Jobs running.
====
Terminated Jobs:
JobId Level Files Bytes Status Finished Name
====================================================================
1 Full 3 5 OK 15- 212 23:30 webjob
2 Incr 2 5 OK 15- 212 23:37 webjob
3 Diff 3 9 OK 15- 212 23:40 webjob
#显示备份任务webjob第一次为full完全备份,第二次为增量备份,第三次为差异备份。
Tags:
备份恢复上一篇:vps/lnmp,debian下安装sendmail组件 下一篇:
[收藏此文章]