Bacula restore Linux
bconsole
Thanks to Andreas Keck.
Default directory is /opt/bacula/working
Client name is tu-xxx
Preperation restore:
echo "list clients" | /opt/bacula/bin/bconsole | grep -i tu-xxx
echo "list jobtotals" | /opt/bacula/bin/bconsole | grep -i tu-xxx
echo "list jobs" | /opt/bacula/bin/bconsole | grep -i tu-xxx
(you get jobid, first column)
echo "list joblog jobid=xxxxxx" | /opt/bacula/bin/bconsole | grep -i tu-xxx
Start Restore:
Start bconlole
/opt/bacula/bin/bconsole
Now you are connetet to bacula server. Prompt is *
restore client=tu-xxx where= 6 (6: Select backup for a client before a specified time)
2015-11-10 00:25:07 (time stamp from previous output, list joblog jobid=xxxxxx)
cd
(navigate to the file/directory which should be restored)
ls
(shows listing of the cwd)
mark adjtime
(mark file, in example /etc/adjtime)
Output:1 file marked.
done
Following message appear:
Bootstrap records written to /opt/bacula/working/unixxx.bsr
The Job will require the following (*=>InChanger):
Volume(s) Storage(s) SD Device(s)
===========================================================================
yyy-disk1-1271 FileChanger-yyy FileChanger-yyy
Volumes marked with "*" are in the Autochanger.
1 file selected to be restored.
Using Catalog "uniyyy"
Run Restore job
JobName: DefaultRestore
Bootstrap: /opt/bacula/working/unixxx.bsr
Where:
Replace: Always
FileSet: FullSet
Backup Client: tu-xxx
Restore Client: tu-xxx
Storage: FileChanger-ZDV
When: 2015-11-20 16:39:07
Catalog: uniyyy
Priority: 10
Plugin Options: *None*
OK to run? (yes/mod/no):
yes (restore starts, jobid will be shown)
quit (leave the bconsole)
with
echo "list joblog jobid=xxxxxx" | /opt/bacula/bin/bconsole
you can watch the restore