Connecting to Director 192.168.17.100:9101
1000 OK: 102 bacula-test-dir Version: 7.4.1 (15 February 2016)
Enter a period to cancel a command.
1
*label #标签状态
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
The defined Storage resources are:
1: File1
2: File2
Select Storage resource (1-2): 1 #定义的存储资源
Enter new Volume name: vol-20160601
Defined Pools:
1: Default
2: File
3: Scratch
Select the Pool (1-3): 2 #文件类型
Connecting to Storage daemon File1 at 192.168.17.100:9103 ...
Sending label command for Volume "vol-20160601" Slot 0 ...
3000 OK label. VolBytes=209 VolABytes=0 VolType=1 Volume="vol-20160601" Device="FileChgr1-Dev1" (/tmp)
Catalog record for Volume "vol-20160601", Slot 0 successfully created.
Requesting to mount FileChgr1 ...
3906 File device ""FileChgr1-Dev1" (/tmp)" is always mounted.
1
*run #执行备份操作
A job name must be specified.
The defined Job resources are:
1: Backup-17.98
2: BackupClient1
3: BackupCatalog
4: RestoreFiles
Select Job resource (1-4): 3 #选择需要备份的客户端
Run Backup job
JobName: BackupCatalog
Level: Full
Client: bacula-test-fd
FileSet: Catalog
Pool: File (From Job resource)
Storage: File1 (From Job resource)
When: 2016-06-01 15:59:49
Priority: 11
OK to run? (yes/mod/no): yes #同意备份
Job queued. JobId=37
1
*messages
You have no messages.
1
*exit
4.2 恢复操作
1
#bconsole
Connecting to Director 192.168.17.100:9101
1000 OK: 102 bacula-test-dir Version: 7.4.1 (15 February 2016)
Enter a period to cancel a command.
1
*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): 5
Defined Clients:
1: bacula-17-98
2: bacula-test-fd
Select the Client (1-2): 2
The defined FileSet resources are:
1: Catalog
2: Full Set
Select FileSet resource (1-2): 2
+-------+-------+----------+-----------+---------------------+--------------------+
| JobId | Level | JobFiles | JobBytes | StartTime | VolumeName |
+-------+-------+----------+-----------+---------------------+--------------------+
| 1 | F | 126 | 731,496 | 2016-05-18 16:02:32 | linux-file1 |
| 29 | D | 5 | 991,369 | 2016-05-29 23:05:04 | db-2016-05-29-id29 |
| 32 | I | 2 | 1,000,660 | 2016-05-30 23:05:04 | db-2016-05-30-id32 |
| 35 | I | 2 | 1,038,878 | 2016-05-31 23:05:05 | db-2016-05-31-id35 |
+-------+-------+----------+-----------+---------------------+--------------------+
You have selected the following JobIds: 1,29,32,35
Building directory tree for JobId(s) 1,29,32,35 ... ++++++++++++++++++++++++++++++++++++++++
122 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.
Bootstrap records written to /var/spool/bacula//bacula-test-dir.restore.1.bsr
Bootstrap records written to /var/spool/bacula//bacula-test-dir.restore.1.bsr
The Job will require the following (*=>InChanger):
Volume(s) Storage(s) SD Device(s)
===========================================================================