Home > Welcome to the Bacula Enterprise Trial > Using Bacula Enterprise Trial > Scenario 4: Restoring Files from the Previous Backup Job using bconsole

Scenario 4: Restoring Files from the Previous Backup Job using bconsole

In this particular scenario, we will demonstrate how to perform a manual restore job using bconsole – the Bacula command line administration tool. Make sure to complete Scenario 3 first in order to follow along.

  1. To access bconsole, log in via SSH as “root” to your Bacula Enterprise Trial VM using “bacula” as the password.
  2. In bconsole, type “restore” to open the restore selection window. In this windows, you will find various methods to locate the backup job you wish to restore.
  3. Type “1” to display a list of the last 20 jobs that were executed. This will allow you to see the recently run jobs on this Director. If you have been following the trial scenarios, you will likely find a jobid that corresponds to the Linux-etc files backup from Scenario 3. In the screenshot below, this job is identified as JobId #3.
  4. Next, enter “3” which triggers a prompt for the desired JobId(s) for restore, followed by the JobId. In this case, the JobId is also 3.
  5. Once the JobId is entered, Bacula builds a virtual directory listing of the files that were backed up in this particular job, based on the information in the Catalog. The restore console’s “File Selection” mode allows you to navigate through this directory and select the files you wish to restore. The “help” command will display all available commands in the restore console. To restore everything, simply type “mark *”.
  6. Once the files are marked, typing “done” allows you to review the restore settings before running it. You can modify things such as the restore path, the Client where the files will be restored, and the replace settings for existing files.
  7. Type “mod” and then select item “11” to change the “Replace” options. This determines the rules that Bacula will follow if it finds existing files in the restore directory. Change to “Always” by selecting option “1”. In this case, the “Always” rule permits you to overwrite all files from previous restore jobs.
  8. Type “yes” to initiate the restore, and then “messages” to review the job log during execution. Once complete, the job log should display “Restore OK”.
  9. To verify the restore, type “exit” to exit bconsole, and then “ls /tmp/bacula-restores/etc/”.
  10. Pay attention to the available space in the Trial VM’s “/tmp” directory when conducting multiple restore jobs. It is advisable to clear all contents within “/tmp/bacula-restore” and “/tmp/bacula-restores” after testing a restore to prevent the VM’s “/” partition from reaching full capacity.