This episode guides you through the Bacula restore workflow: building an interactive restore job from bconsole by selecting client, FileSet, and time, directing results to the original or an alternative location with where= and replace=, plus practicing routine restore drills into a test directory with file verification.

Every previous episode built toward one thing: the ability to restore data. A backup system that has never been restore-tested is not a backup system — it's merely a file-copying process. In episode 8 we do the most important thing: restore data from volumes back to the client, with full control over location and overwrite behavior.
We'll build a restore job through bconsole, understand the where and replace parameters, then close with the restore drill practice — the routine that separates professional administrators from those who just run jobs.
In bconsole, type:
* restoreBacula opens a menu of ways to find the files to restore:
To select the JobIds, you have the following options:
1: List last 20 Jobs
2: List Jobs where a given File is saved
3: Enter list of JobIds to select from
4: Find the JobIds for a File in a given Job
5: Find the JobIds for a File in the last 20 Jobs
6: Find the JobIds for a File in the last 20 Jobs for a Client
7: Enter a list of Paths to look up
8: Enter a list of Client names
9: Enter a list of Restore Job names
Select item:The most-used options:
Choose 1, then pick the JobId of the backup you want to restore. Bacula asks for confirmation and builds the restore job:
The defined Restore Job is:
Restore Job Parameters:
Job: RestoreFiles
Client: client-fd
Storage: FileStorage
Pool: FilePool
FileSet: Set Web
Restore Job: RestoreFiles
Where: /tmp/bacula-restores
Replace: always
JobId(s) to restore: 1
OK to run? (yes/mod/no):Catalog-based restore means Bacula searches for files at a specific point in time. The JobIds choice defines that point: pick the JobId of the last backup before the data-loss event. If unsure, pick the latest full JobId followed by later incrementals — Bacula restores the file state according to the versions in the catalog.
You can also restore client A's backup to client B — just choose the target client in the menu. This is useful for server migration or hardware replacement.
The Where parameter sets the destination directory on the client. This is your biggest safeguard:
Where = /tmp/bacula-restores — restores to a test directory, never touching the original data.Where = / — restores to the original location (paths in the backup map directly).OK to run? (yes/mod/no): mod
... choose "Where" then fill in the path ...Always start with a non-root where to verify the results before overwriting original data.
Replace determines what happens when a file with the same name already exists at the destination:
Replace = always — overwrite without asking.Replace = never — don't overwrite; save the restored file under another name.Replace = ifnewer — overwrite only if the backup file is newer.Replace = ifolder — overwrite only if the backup file is older.The safe rule:
* restore ... replace=ifnewer where=/tmp/bacula-restoresWarning
replace=always with where=/ overwrites live files without confirmation. In a disaster scenario, that is exactly what you want — but for testing or partial restores, ifnewer or a separate directory is far safer.
The number one best practice in backup administration: routine restore drills. The procedure:
* restore jobid=1 where=/tmp/bacula-test replace=ifnewerAfter the job finishes (Terminated, status Restore OK), verify:
ls -l /tmp/bacula-test/var/www/index.html
cat /tmp/bacula-test/var/www/index.htmlCompare with the original file:
sha256sum /var/www/index.html /tmp/bacula-test/var/www/index.htmlIdentical checksums are proof of a valid restore.
Tip
Automate the drill: run a restore job at night into the /tmp/restore-test-$(date) directory, check its status, and alert if it isn't Restore OK. A backup that is never tested is fragile hope.
* restore
... choose option 2: find JobIds that saved the file ...
Path to File: /var/www/index.htmlBacula finds the jobs that saved that file and builds a restore for it — without needing to know a specific volume or job.
Install an FD on the new machine, define a new Client on the Director, then during restore choose the new machine as the target. Bacula will restore the data to the replacement machine with paths according to where. This is the basis of cross-hardware disaster recovery migration.
Key takeaways:
restore in bconsole builds a restore job from your JobId/client/time choices.where sets the destination location; replace sets the overwrite behavior.where=/tmp/... and replace=ifnewer.In the next episode, episode 9, we'll verify data and manage autoprune — running Verify jobs to compare the client with the catalog, checking list volumes, triggering prune/purge for catalog consistency, and making sure the catalog itself is always backed up. This is the key to trusting your backup system.