Bacula-users

Re: [Bacula-users] How would I 'nuke' my bacula instance - Start afresh so to speak.

2011-01-05 05:13:40
Subject: Re: [Bacula-users] How would I 'nuke' my bacula instance - Start afresh so to speak.
From: Jeremy Maes <jma AT schaubroeck DOT be>
To: bacula-users AT lists.sourceforge DOT net
Date: Wed, 05 Jan 2011 11:11:21 +0100
Op 5/01/2011 10:55, Mister IT Guru schreef:
> On 05/01/2011 09:51, Graham Keeling wrote:
>> On Wed, Jan 05, 2011 at 09:38:14AM +0000, Mister IT Guru wrote:
>>> I've run lots of test jobs, and I have a lot of backup data, that I
>>> don't really need, around 2TB or so! (we have a few servers!) I would
>>> like to know if it's possible to remove all of those jobs out of the
>>> bacula database. Personally, I would have cut this configure out, and
>>> drop it on a previous backup I have, but then I don't learn about how
>>> bacula works.
>>>
>>> My main fear, is that I rsync my disk backend offsite, and I've
>>> currently suspended that because of all these test jobs that I'm
>>> running. Also, I've reset the bacula-dir and sd, during backups, and
>>> I've a feeling that some of them are not viable.
>>>
>>> I guess what I'm asking is, is it possible to wipe the slate clean, but
>>> keep my working configuration from within bacula?
>> It sounds like you just want to wipe your sql database and keep your bacula
>> configuration files.
>>
>> When I want to do this, I stop bacula and stop mysql (I use mysql):
>>
>> /etc/rc.d/init.d/bacula stop
>> /etc/rc.d/init.d/mysql stop
>>
>> I then 'rm -r' the bacula mysql database files - something like this:
>>
>> cd /var/lib/mysql/data
>> rm -r bacula
>>
>> I then start mysql and start bacula:
>>
>> /etc/rc.d/init.d/mysql start
>> /etc/rc.d/init.d/bacula start
>>
> This would mean I would manually deleted my disk based backups?
> Otherwise if I don't then wouldn't the first attempt to run a backup
> fail, because that disk volume exists? DiskBackupPool-001 as a file
> already exists, so will bacula just overwrite it?
>

Or you could do this, as the bacula manual describes:
Section 41.3 Re-initializing the Catalog Database

After you have done some initial testing with Bacula, you will probably 
want to re-initialize the catalog
database and throw away all the test Jobs that you ran. To do so, you 
can do the following:

cd <install-directory>
./drop_mysql_tables
./make_mysql_tables

Please note that all information in the database will be lost and you 
will be starting from scratch. If you
have written on any Volumes, you must write an end of file mark on the 
volume so that Bacula can reuse it.

Do so with:
(stop Bacula or unmount the drive)
mt -f /dev/nst0 rewind
mt -f /dev/nst0 weof

Where you should replace /dev/nst0 with the appropriate tape drive 
device name for your machine.

If you're writing to files on disk you can just delete the volumes 
without any issues after clearing the catalog.

Kind regards,
Jeremy

 **** DISCLAIMER ****
http://www.schaubroeck.be/maildisclaimer.htm

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users