Bacula-users

Re: [Bacula-users] Disaster Recovery Test

2012-09-25 14:21:35
Subject: Re: [Bacula-users] Disaster Recovery Test
From: dweimer <dweimer AT dweimer DOT net>
To: <bacula-users AT lists.sourceforge DOT net>
Date: Tue, 25 Sep 2012 13:19:24 -0500
On 2012-09-25 11:39, lst_hoe02 AT kwsoft DOT de wrote:
> Zitat von dweimer <dweimer AT dweimer DOT net>:
>
>> Now that I have been running Bacula for several months, I was 
>> working
>> on testing disaster recovery, just in case I need to.  I am a little
>> lost though on what I need to do to get the database restored.  I am
>> going on the assumption that All I will have is the off site data
>> (hopefully not ever this bad as this is my home system).
>> I have a nightly admin job that kicks off a Python script on the 
>> server
>> which creates a bzipped tar of my Bootstrap files, state files, and 
>> the
>> server/client configuration files and emails that to my gmail 
>> account.
>> So for my test I built a virtual machine (Original and test system
>> running FreeBSD 9.0-RELEASE-p4), installed PostgreSQL, and Bacula,
>> created the initial Bacula tables, restored the configuration,
>> bootstrap, and state files from my emailed tar file.
>>
>> Here's where things go a little wrong, I mount my external backup 
>> drive
>> to the test server, launch bconsole, and issue the status command 
>> for
>> the client, since I restored the state files, I can see the job ID 
>> of my
>> last catalog Backup.  Then issue the run command, select restore, 
>> enter
>> the job ID when prompted, and select mod, enter the bootstrap file 
>> from
>> the catalog backup and start the job.
>
> Hello
>
> I have myself not fully tested disaster recovery but as far as i know
> you need a valid bootstrap from your catalog (database) backup. With
> this you can first recover the catalog backup (ASCII dump) and then
> use the tools provided for you database to import this dump. After
> that you are up and running to restore from your volumes. If you 
> don't
> have a recent catalog backup you might use "bscan" to create needed
> records by scanning your volumes.
>
> Restore a bootstrap file is explained here:
> 
> http://www.bacula.org/5.2.x-manuals/en/main/main/Restore_Command.html#SECTION0029140000000000000000
>

After reading this over again for the hundredth time give or take a few 
times, I finally figured it out, if you keep going through the console 
log, it did actually restore a file despite the fatal error messages

local-dir 5.2.12 (12Sep12):
   Build OS:               amd64-portbld-freebsd9.0 freebsd 
9.0-RELEASE-p4
   JobId:                  1
   Job:                    RestoreFiles.2012-09-24_20.43.59_07
   Restore Client:         bacula.dweimer.local-fd
   Start time:             24-Sep-2012 20:44:01
   End time:               24-Sep-2012 20:44:25
   Files Expected:         0
   Files Restored:         1
   Bytes Restored:         562,544,754
   Rate:                   23439.4 KB/s
   FD Errors:              1
   FD termination status:  OK
   SD termination status:  Error
   Termination:            *** Restore Error ***

24-Sep 20:44 bacula.dweimer.local-dir JobId 1: Begin pruning Jobs older 
than 20 days .
24-Sep 20:44 bacula.dweimer.local-dir JobId 1: No Jobs found to prune.
24-Sep 20:44 bacula.dweimer.local-dir JobId 1: Begin pruning Files.
24-Sep 20:44 bacula.dweimer.local-dir JobId 1: No Files found to prune.
24-Sep 20:44 bacula.dweimer.local-dir JobId 1: End auto prune.

I was not actually paying attention and processing this part of the 
page:

You will then need to follow the instructions for your database type to 
recreate the database from the ASCII backup file. See the Catalog 
MaintenanceCatMaintenanceChapter chapter of this manual for examples of 
the command needed to restore a database from an ASCII dump (they are 
shown in the Compacting Your XXX Database sections).

However if the job didn't give me a fatal error I might have looked on 
more since this was after the restore job information, when I checked 
the /tmp/bacula-restore folder, sure enough under a few more folders was 
the SQL dump of the database.  When I got to the fatal error in the 
restore console log, I just started back over at the top, thinking I 
missed something along the way, instead of looking farther to see if 
there was something after that part that still needed done, despite 
having the error message.

-- 
Thanks,
    Dean E. Weimer
    http://www.dweimer.net/

------------------------------------------------------------------------------
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 DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>