Created: 21 December 2008
バックアップ してリストアする (21 December 2008)
# bconsole
Connecting to Director 192.168.83.106:9101
1000 OK: bacula-dir Version: 2.2.8 (26 January 2008)
Enter a period to cancel a command.
*label
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
Automatically selected Storage: File
Enter new Volume name: temp
Automatically selected Pool: Default
Connecting to Storage daemon File at 192.168.83.106:9103 ...
Sending label command for Volume "temp" Slot 0 ...
3000 OK label. VolBytes=204 DVD=0 Volume="temp" Device="FileStorage" (/mnt/nfs/backup-bacula/test)
Catalog record for Volume "temp", Slot 0 successfully created.
Requesting to mount FileStorage ...
3906 File device "FileStorage" (/mnt/nfs/backup-bacula/test) is always mounted.
*run
A job name must be specified.
Automatically selected Job: Client1
Run Backup job
JobName: Client1
Level: Incremental
Client: bacula-fd
FileSet: Full Set
Pool: Default (From Job resource)
Storage: File (From Job resource)
When: 2008-12-21 15:01:53
Priority: 10
OK to run? (yes/mod/no): mod
Parameters to modify:
1: Level
2: Storage
3: Job
4: FileSet
5: Client
6: When
7: Priority
8: Pool
Select parameter to modify (1-8): 1
Levels:
1: Base
2: Full
3: Incremental
4: Differential
5: Since
Select level (1-5): 2
Run Backup job
JobName: Client1
Level: Full
Client: bacula-fd
FileSet: Full Set
Pool: Default (From Job resource)
Storage: File (From Job resource)
When: 2008-12-21 15:01:53
Priority: 10
OK to run? (yes/mod/no): yes
Job queued. JobId=13
*status
Status available for:
1: Director
2: Storage
3: Client
4: All
Select daemon type for status (1-4): 3
Automatically selected Client: bacula-fd
Connecting to Client bacula-fd at 192.168.83.106:9102
bacula-fd Version: 2.2.8 (26 January 2008) i386-redhat-linux-gnu redhat
Daemon started 21-12008 09:49, 8 Jobs run since started.
Heap: heap=520,192 smbytes=149,399 max_bytes=218,923 bufs=76 max_bufs=146
Sizeof: boffset_t=8 size_t=4 debug=0 trace=0
Running Jobs:
Director connected at: 21-12008 15:02
No Jobs running.
====
Terminated Jobs:
JobId Level Files Bytes Status Finished Name
======================================================================
13 Full 6 5.288 M OK 21-12008 15:02 Client1
====
You have messages.
*quitバックアップ元のファイルの一部を削除します。
# rm /root/temp/*1 リストアしてみる。
# bconsole
Connecting to Director 192.168.83.106:9101
1000 OK: bacula-dir Version: 2.2.8 (26 January 2008)
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: Cancel
Select item: (1-12): 1
+-------+-----------+---------------------+----------+----------+------------+
| jobid | client | starttime | joblevel | jobfiles | jobbytes |
+-------+-----------+---------------------+----------+----------+------------+
| 13 | bacula-fd | 2008-12-21 15:02:06 | F | 6 | 5288356 |
| 12 | bacula-fd | 2008-12-21 14:54:38 | F | 5052 | 75794349 |
+-------+-----------+---------------------+----------+----------+------------+
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: Cancel
Select item: (1-12): 3
Enter JobId(s), comma separated, to restore: 13
You have selected the following JobId: 13
Building directory tree for JobId 13 ...
1 Job, 6 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
Bootstrap records written to /var/spool/bacula/bacula-dir.restore.1.bsr
The job will require the following
Volume(s) Storage(s) SD Device(s)
===========================================================================
T2 File FileStorage
5 files selected to be restored.
Automatically selected Client: bacula-fd
Run Restore job
JobName: RestoreFiles
Bootstrap: /var/spool/bacula/bacula-dir.restore.1.bsr
Where: /root/temp
Replace: always
FileSet: Full Set
Backup Client: bacula-fd
Restore Client: bacula-fd
Storage: File
When: 2008-12-21 15:24:51
Catalog: MyCatalog
Priority: 10
OK to run? (yes/mod/no): yes
Job queued. JobId=14
*status
Status available for:
1: Director
2: Storage
3: Client
4: All
Select daemon type for status (1-4): 3
Automatically selected Client: bacula-fd
Connecting to Client bacula-fd at 192.168.83.106:9102
bacula-fd Version: 2.2.8 (26 January 2008) i386-redhat-linux-gnu redhat
Daemon started 21-12008 09:49, 9 Jobs run since started.
Heap: heap=520,192 smbytes=149,399 max_bytes=218,923 bufs=76 max_bufs=146
Sizeof: boffset_t=8 size_t=4 debug=0 trace=0
Running Jobs:
Director connected at: 21-12008 15:25
No Jobs running.
====
Terminated Jobs:
JobId Level Files Bytes Status Finished Name
======================================================================
12 Full 5,052 75.79 M OK 21-12008 14:57 Client1
13 Full 6 5.288 M OK 21-12008 15:02 Client1
14 5 5.288 M OK 21-12008 15:25 RestoreFiles
====
You have messages.
*quit
#