|
[root@dlp ~]# bconsole
Connecting to Director localhost:9101
1000 OK: 10002 bacula-dir Version: 15.0.3 (25 March 2025)
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: Select object to restore
14: Cancel
Select item: (1-13): 5
Automatically selected Client: bacula-fd
Automatically selected FileSet: Full Set
+-------+-------+----------+----------+---------------------+--------------+
| JobId | Level | JobFiles | JobBytes | StartTime | VolumeName |
+-------+-------+----------+----------+---------------------+--------------+
| 1 | F | 5 | 443 | 2025-08-07 15:15:11 | Vol-20250807 |
+-------+-------+----------+----------+---------------------+--------------+
You have selected the following JobId: 1
Building directory tree for JobId(s) 1 ...
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: /
# バックアップデータを一覧表示
$ ls
home/
# リストアしたいデータをマーキング
$ mark home
5 files marked.
# マーキングしたデータを一覧表示
$ lsmark
*home/
*cent/
*.bash_logout
*.bash_profile
*.bashrc
# リストア設定を終了
$ done
Bootstrap records written to /var/spool/bacula/bacula-dir.restore.1.bsr
The Job will require the following (*=>InChanger):
Volume(s) Storage(s) SD Device(s)
===========================================================================
Vol-20250807 File1 FileChgr1
Volumes marked with "*" are in the Autochanger.
5 files selected to be restored.
Using Catalog "MyCatalog"
Run Restore job
JobName: RestoreFiles
Bootstrap: /var/spool/bacula/bacula-dir.restore.1.bsr
Where: /tmp/bacula-restores
Replace: Always
FileSet: Full Set
Backup Client: bacula-fd
Restore Client: bacula-fd
Storage: File1
When: 2025-08-07 15:17:46
Catalog: MyCatalog
Priority: 10
Plugin Options: *None*
# リストアジョブ実行
OK to run? (yes/mod/no): yes
Job queued. JobId=2
# メッセージ (ログ) を表示
*messages
07-Aug 15:18 bacula-dir JobId 2: Start Restore Job RestoreFiles.2025-08-07_15.18.14_05
07-Aug 15:18 bacula-dir JobId 2: Restoring files from JobId(s) 1
07-Aug 15:18 bacula-dir JobId 2: Connected to Storage "File1" at dlp.srv.world:9103 with TLS
07-Aug 15:18 bacula-dir JobId 2: Using Device "FileChgr1-Dev2" to read.
07-Aug 15:18 bacula-dir JobId 2: Connected to Client "bacula-fd" at localhost:9102 with TLS
07-Aug 15:18 bacula-fd JobId 2: Connected to Storage at dlp.srv.world:9103 with TLS
07-Aug 15:18 bacula-sd JobId 2: Ready to read from volume "Vol-20250807" on File device "FileChgr1-Dev2" (/tmp).
07-Aug 15:18 bacula-sd JobId 2: Forward spacing Volume "Vol-20250807" to addr=245
07-Aug 15:18 bacula-sd JobId 2: End of Volume "Vol-20250807" at addr=1698 on device "FileChgr1-Dev2" (/tmp).
07-Aug 15:18 bacula-sd JobId 2: Elapsed time=00:00:01, Transfer rate=913 Bytes/second
07-Aug 15:18 bacula-dir JobId 2: Bacula bacula-dir 15.0.3 (25Mar25):
Build OS: x86_64-redhat-linux-gnu redhat (Coughlan)
JobId: 2
Job: RestoreFiles.2025-08-07_15.18.14_05
Restore Client: "bacula-fd" 15.0.3 (25Mar25) x86_64-redhat-linux-gnu,redhat,(Coughlan)
Where: /tmp/bacula-restores
Replace: Always
Start time: 07-Aug-2025 15:18:16
End time: 07-Aug-2025 15:18:17
Elapsed time: 1 sec
Files Expected: 5
Files Restored: 5
Bytes Restored: 684 (684 B)
Rate: 0.7 KB/s
FD Errors: 0
FD termination status: OK
SD termination status: OK
Termination: Restore OK
07-Aug 15:18 bacula-dir JobId 2: Begin pruning Jobs older than 6 months .
07-Aug 15:18 bacula-dir JobId 2: No Jobs found to prune.
07-Aug 15:18 bacula-dir JobId 2: Begin pruning Files.
07-Aug 15:18 bacula-dir JobId 2: No Files found to prune.
07-Aug 15:18 bacula-dir JobId 2: End auto prune.
*exit
[root@dlp ~]# ll /tmp/bacula-restores/home
total 0
drwx------. 2 cent cent 62 Dec 14 2024 cent
# リストアされた
|