A strong backup strategy only makes sense if it's easy to restore a consistent back up. The previous recipe should have provided insights on the right backup strategy from the answer to the question, how do you expect to backup? As a result, it's important that you always test your restore procedures to see whether they fit your business needs; here's a proposed one.
Both Bacula and rsync require that you install Debian again and set up the Bacula file daemon as explained in the corresponding recipes of this book. This is all you need to get prepared for restore.
For the Bacula example, we deleted a file from
/var/www, and we will restore it with Bacula. For future reference, here's the MD5 of the file we're deleting:
From the Storage/Director server, fire up Bacula's console
You have several options to restore, and all of them will use the catalog to find the matching job and pool to restore from. We will choose option 5—most recent backup for the client web01-fd.
Bacula will match a recent
JobIdand will put you in the selection mode where you can choose which file(s) to restore. We browse to
install.log, type done, and hit yes.
Now we can find
/bacula-restoresand move it back to
/var/wwwif we decide to do so.
Using rsync, you just need to oppose the argument to restures. Now the backup server comes first. This is to be executed from the client machine:
rsync –avzuser@backup:/var/backups/webapp/* /var/www rsync –avzuser@backup:/var/backups/mysql /var/lib