*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: Cancel
Select item: (1-12): 5 ←5を選択
Automatically selected Client: bacula-fd
Automatically selected FileSet: Full Set
+-------+-------+----------+----------+---------------------+------------+-----------+
| JobId | Level | JobFiles | JobBytes | StartTime | VolumeName | StartFile |
+-------+-------+----------+----------+---------------------+------------+-----------+
| 1 | F | 50 | 874,483 | 2008-07-21 13:42:28 | TESTVOL01 | 0 |
+-------+-------+----------+----------+---------------------+------------+-----------+
You have selected the following JobId: 1
Building directory tree for JobId 1 ... ++++++++++++++++++++
1 Job, 41 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: /
$ cd var/log ←logディレクトリに移動
cwd is: /var/log/
このディレクトリにリカバリ対象のファイル、今回はログファイルが存在する。ここでリストアの対象とするファイルを指定します。リストア対象の選択はmarkコマンドで行います。今回は全てのログファイルをリストアします。
$ mark *
49 files marked.
これで復元対象の選択は完了した。doneと入力して選択画面から抜ける。
$ done
doneコマンドを入力すると、復元の確認が表示されます。復元されるデータはWhereで指定したディレクトリに置かれるので、存在しているディレクトリを指定します。デフォルトでは/tmp/bacula-restoresとなっています。
Bootstrap records written to /var/spool/bacula/bacula-dir.restore.2.bsr
The job will require the following
Volume(s) Storage(s) SD Device(s)
===========================================================================
TESTVOL01 File FileStorage
49 files selected to be restored.
Run Restore job
JobName: RestoreFiles
Bootstrap: /var/spool/bacula/bacula-dir.restore.2.bsr
Where: /tmp/bacula-restores
Replace: always
FileSet: Full Set
Client: bacula-fd
Storage: File
When: 2008-07-21 15:04:57
Catalog: MyCatalog
Priority: 10
OK to run? (yes/mod/no): yes ←変更がある場合はmodをこの状態で復元する場合はyesを選択
Job queued. JobId=3