SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
VirtualFull
Author Message
Post VirtualFull 
I have a problem with VirtualFull and I don’t know whether this behavior is by design or I messed up my configuration:

I’m trying to run a Virtualfull backup but bacula is trying to read the last virtualfull (which is stored offsite) so it fails. I thought bacula would construct a VirtualFull from the last Full-incr-diff. Since I haven’t run a Full since the last VirtualFull it seems to me bacula is trying to construct the Virtualfull from VirtualFull-incr-Diff. Is this the normal behavior?

Post VirtualFull 
On 7/9/2012 4:38 PM, Jose Blanco wrote:

I have a problem with VirtualFull and I don’t know whether this
behavior is by design or I messed up my configuration:

I’m trying to run a Virtualfull backup but bacula is trying to read
the last virtualfull (which is stored offsite) so it fails. I thought
bacula would construct a VirtualFull from the last Full-incr-diff.
Since I haven’t run a Full since the last VirtualFull it seems to me
bacula is trying to construct the Virtualfull from
VirtualFull-incr-Diff. Is this the normal behavior?


Yes, it is by design. One way to handle this is to use Copy jobs to make
copies of volumes that are to be shipped 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
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bacula-users mailing list
Bacula-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Post VirtualFull 
I have a problem with VirtualFull and I don't know whether this behavior is by
design or I messed up my configuration:

I'm trying to run a Virtualfull backup but bacula is trying to read the last
virtualfull (which is stored offsite) so it fails. I thought bacula would construct
a VirtualFull from the last Full-incr-diff. Since I haven't run a Full since the last
VirtualFull it seems to me bacula is trying to construct the Virtualfull from
VirtualFull-incr-Diff. Is this the normal behavior?

I think that's the way it's supposed to work. VirtualFull is a way to consolidate previous Full+Inc backups into a single Virtual Full backup. I am doing much the same as you, but at the end of my virtual full backups I run a catalog backup to my offsite media (USB disk) then purge all the offsite jobs from the database. The offsite jobs are only for disaster recovery, so they don't need to be in the live catalog anyway - I would never restore from an offsite volume unless my backup server was completely destroyed.

I can post my script for doing this if you want.

James

------------------------------------------------------------------------------
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
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bacula-users mailing list
Bacula-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Post VirtualFull 
I was thinking of doing something similar although manually since my scripting skills are a little bit rusted. I would love to see your script if you don't mind

-----Original Message-----
From: James Harper [mailto:james.harper < at > bendigoit.com.au]
Sent: Tuesday, July 10, 2012 5:14 PM
To: Jose Blanco; bacula-users < at > lists.sourceforge.net
Subject: RE: VirtualFull

I have a problem with VirtualFull and I don't know whether this
behavior is by design or I messed up my configuration:

I'm trying to run a Virtualfull backup but bacula is trying to read
the last virtualfull (which is stored offsite) so it fails. I thought
bacula would construct a VirtualFull from the last Full-incr-diff.
Since I haven't run a Full since the last VirtualFull it seems to me
bacula is trying to construct the Virtualfull from VirtualFull-incr-Diff. Is this the normal behavior?

I think that's the way it's supposed to work. VirtualFull is a way to consolidate previous Full+Inc backups into a single Virtual Full backup. I am doing much the same as you, but at the end of my virtual full backups I run a catalog backup to my offsite media (USB disk) then purge all the offsite jobs from the database. The offsite jobs are only for disaster recovery, so they don't need to be in the live catalog anyway - I would never restore from an offsite volume unless my backup server was completely destroyed.

I can post my script for doing this if you want.

James

------------------------------------------------------------------------------
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
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bacula-users mailing list
Bacula-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Post 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.

James

#!/bin/bash

/etc/bacula/scripts/delete_catalog_backup

/usr/bin/psql -Atc "
SELECT DISTINCT VolumeName
FROM Job
JOIN Pool
ON Job.PoolId = Pool.PoolId
JOIN JobMedia
ON Job.JobId = JobMedia.JobId
JOIN Media
ON JobMedia.MediaId = Media.MediaId
WHERE Pool.Name = 'offsite';
" | while read media
do
#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
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bacula-users mailing list
Bacula-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Post VirtualFull 
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.

-----Original Message-----
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.

James

#!/bin/bash

/etc/bacula/scripts/delete_catalog_backup

/usr/bin/psql -Atc "
SELECT DISTINCT VolumeName
FROM Job
JOIN Pool
ON Job.PoolId = Pool.PoolId
JOIN JobMedia
ON Job.JobId = JobMedia.JobId
JOIN Media
ON JobMedia.MediaId = Media.MediaId
WHERE Pool.Name = 'offsite';
" | while read media
do
#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
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bacula-users mailing list
Bacula-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB