FreeBSD 14
Sponsored Link

Bacula : Run Restore2024/09/19

 

This is basic Restore Operation from backup data.

[1] Run Restore on Bacula console.
root@dlp:~ #
bconsole

Connecting to Director localhost:9101
1000 OK: 10002 dlp.srv.world-dir Version: 15.0.2 (21 March 2024)
Enter a period to cancel a command.

# start restore task
*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-14): 5
Automatically selected Client: dlp.srv.world-fd
Automatically selected FileSet: Full Set
+-------+-------+----------+-----------+---------------------+----------------+
| jobid | level | jobfiles | jobbytes  | starttime           | volumename     |
+-------+-------+----------+-----------+---------------------+----------------+
|     4 | F     |      642 | 1,899,145 | 2024-09-19 10:20:42 | Vol-20240919-2 |
+-------+-------+----------+-----------+---------------------+----------------+
You have selected the following JobId: 4

Building directory tree for JobId(s) 4 ...  +++++++++++++++++++++++++++++++++++++++++++++++
612 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: /

# show backup data
$ ls
etc/
# mark data you'd like to restore
$ mark etc
642 files marked.
# show marked file list
$ lsmark
.....
.....
  *syslog.d/
    *ftp.conf
    *lpr.conf
    *ppp.conf
  *termcap
  *termcap.small
  *ttys
  *unbound
  *zfs/
    *compatibility.d
    *exports
    *exports.lock

# finish restore setting
$ done
Bootstrap records written to /var/db/bacula/dlp.srv.world-dir.restore.1.bsr

The Job will require the following (*=>InChanger):
   Volume(s)                 Storage(s)                SD Device(s)
===========================================================================

    Vol-20240919-2            File1                     FileChgr1

Volumes marked with "*" are in the Autochanger.


642 files selected to be restored.

Using Catalog "MyCatalog"
Run Restore job
JobName:         RestoreFiles
Bootstrap:       /var/db/bacula/dlp.srv.world-dir.restore.1.bsr
Where:           /tmp/bacula-restores
Replace:         Always
FileSet:         Full Set
Backup Client:   dlp.srv.world-fd
Restore Client:  dlp.srv.world-fd
Storage:         File1
When:            2024-09-19 11:01:45
Catalog:         MyCatalog
Priority:        10
Plugin Options:  *None*

# run restore job
OK to run? (yes/mod/no): yes
Job queued. JobId=6

# show messages (log)
*messages
19-Sep 11:02 dlp.srv.world-dir JobId 6: Start Restore Job RestoreFiles.2024-09-19_11.02.23_05
19-Sep 11:02 dlp.srv.world-dir JobId 6: Restoring files from JobId(s) 4
19-Sep 11:02 dlp.srv.world-dir JobId 6: Connected to Storage "File1" at dlp.srv.world:9103 with TLS
19-Sep 11:02 dlp.srv.world-dir JobId 6: Using Device "FileChgr1-Dev2" to read.
19-Sep 11:02 dlp.srv.world-dir JobId 6: Connected to Client "dlp.srv.world-fd" at localhost:9102 with TLS
19-Sep 11:02 dlp.srv.world-fd JobId 6: Connected to Storage at dlp.srv.world:9103 with TLS
19-Sep 11:02 dlp.srv.world-sd JobId 6: Ready to read from volume "Vol-20240919-2" on File device "FileChgr1-Dev2" (/tmp).
19-Sep 11:02 dlp.srv.world-sd JobId 6: Forward spacing Volume "Vol-20240919-2" to addr=266
19-Sep 11:02 dlp.srv.world-sd JobId 6: End of Volume "Vol-20240919-2" at addr=2000993 on device "FileChgr1-Dev2" (/tmp).
19-Sep 11:02 dlp.srv.world-sd JobId 6: Elapsed time=00:00:01, Transfer rate=1.981 M Bytes/second
19-Sep 11:02 dlp.srv.world-dir JobId 6: Bacula dlp.srv.world-dir 15.0.2 (21Mar24):
  Build OS:               amd64-portbld-freebsd14.0 freebsd 14.0-RELEASE-p10
  JobId:                  6
  Job:                    RestoreFiles.2024-09-19_11.02.23_05
  Restore Client:         "dlp.srv.world-fd" 15.0.2 (21Mar24) amd64-portbld-freebsd14.0,freebsd,14.0-RELEASE-p10
  Where:                  /tmp/bacula-restores
  Replace:                Always
  Start time:             19-Sep-2024 11:02:25
  End time:               19-Sep-2024 11:02:26
  Elapsed time:           1 sec
  Files Expected:         642
  Files Restored:         642
  Bytes Restored:         1,899,145 (1.899 MB)
  Rate:                   1899.1 KB/s
  FD Errors:              0
  FD termination status:  OK
  SD termination status:  OK
  Termination:            Restore OK

19-Sep 11:02 dlp.srv.world-dir JobId 6: Begin pruning Jobs older than 6 months .
19-Sep 11:02 dlp.srv.world-dir JobId 6: No Jobs found to prune.
19-Sep 11:02 dlp.srv.world-dir JobId 6: Begin pruning Files.
19-Sep 11:02 dlp.srv.world-dir JobId 6: No Files found to prune.
19-Sep 11:02 dlp.srv.world-dir JobId 6: End auto prune.

*exit

root@dlp:~ #
ls -l /tmp/bacula-restores/etc

total 508
drwxr-xr-x  30 root wheel    uarch   111 Sep 19 08:54 ./
drwxr-x--x   3 root wheel    uarch     3 Sep 19 11:02 ../
drwxr-xr-x   2 root wheel    uarch     2 Nov 10  2023 X11/
lrwxr-xr-x   1 root wheel    uarch    12 Nov 10  2023 aliases@ -> mail/aliases
drwxr-xr-x   2 root wheel    uarch     2 Nov 10  2023 authpf/
-rw-r--r--   1 root wheel    uarch   285 Nov 10  2023 auto_master
drwxr-xr-x   2 root wheel    uarch     9 Nov 10  2023 autofs/
-rw-r--r--   1 root wheel    uarch   379 Nov 10  2023 blacklistd.conf
drwxr-xr-x   2 root wheel    uarch     5 Nov 10  2023 bluetooth/
drwxr-xr-x   2 root wheel    uarch     3 Nov 10  2023 cron.d/
-rw-r--r--   1 root wheel    uarch   646 Nov 10  2023 crontab
-rw-r--r--   1 root wheel    uarch    40 Nov 10  2023 csh.cshrc
-rw-r--r--   1 root wheel    uarch   288 Nov 10  2023 csh.login
-rw-r--r--   1 root wheel    uarch    41 Nov 10  2023 csh.logout
-rw-r--r--   1 root wheel    uarch   494 Nov 10  2023 ddb.conf
.....
.....
# backup data restored
Matched Content