I think we both are using bacula in a very similar way. My offsite storage is only to be used in case of catastrophe. I too make a copy of the catalog and bacula configuration files to the external HD. I also add an Ubuntu live CD image just in case. Thanks for your script. I'm confident I'll be able to modify it a bit for my purposes.
From: James Harper [mailto:james.harper < at > bendigoit.com.au]
Sent: Wednesday, July 11, 2012 9:18 PM
To: Jose Blanco; bacula-users < at > lists.sourceforge.net
Subject: RE: VirtualFull
I have a backup_catalog_pre and backup_catalog_post scripts. The _pre script just calls the catalog backup script so it can be backed up by the job. The _post script is on the end of this email. It gathers any volumes associated with jobs in the offsite pool and purges them. Then for good measure it also copies the bsr file to the media. I use postgresql, you'd need to rewrite it a bit to use mysql etc.
After the script runs, bacula will have no memory of the jobs on the offsite media and so will not choose them as a source for any VirtualFull jobs. In my case, needing to restore from offsite media would be because the backup server was completely wiped out so a catalog restore is required in that case anyway.
At some point I would also like to copy my bacula configs and even static binaries to the USB media as part of the job, but I haven't done that yet. Even better would be making the USB backup drive bootable too, although that is more effort to maintain.
/usr/bin/psql -Atc "
SELECT DISTINCT VolumeName
ON Job.PoolId = Pool.PoolId
ON Job.JobId = JobMedia.JobId
ON JobMedia.MediaId = Media.MediaId
WHERE Pool.Name = 'offsite';
" | while read media
#echo Purging $media
echo "purge volume=$media" | /usr/bin/bconsole >/dev/null 2>/dev/null done
cp /var/lib/bacula/BackupCatalog.bsr /backup/offsite
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
Bacula-users mailing list
Bacula-users < at > lists.sourceforge.net