Bacula-users

Re: [Bacula-users] Restore daily ?

2009-12-29 12:06:53
Subject: Re: [Bacula-users] Restore daily ?
From: Jean-François Leroux <leroux.jeanfrancois AT gmail DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 29 Dec 2009 18:03:38 +0100
Thanks a lot Avi. I'll try that and tell you how it goes :)

Cheers.
Jean-François Leroux

2009/12/29 Avi Rozen <avi.rozen AT gmail DOT com>:
> Jean-François Leroux wrote:
>
>> Hi, , I'm using bacula-1.38.11.8 on debian Etch. I backup several
>> servers with bacula, these machines being added at the end of the
>> general bacula-dir.conf with the sign '@' , e.g '@machine1.conf'
>>
>> Now, I would like to create a job for restoring daily some files from
>> one machine to another.
>> I already have a general restore job in my bacula-dir.conf. So the
>> question is : do I add a restore job in each of these 'machine' files
>> so that I can restore files from these machines in different places
>> and a t different times?
>> How do I add this restore job to the job currently done? The schedule
>> resource doesn't mention which job is to be done.
>>
>
> For a while I had such a setup, where I used RunAfterJob to run a script
> containing something like this:
>
> bconsole <<EOF
> restore client=machine-cycle-fd restoreclient=machine-cycle-fd
> fileset=machine-cycle-fileset select current all done
> 5
> yes
> quit
> EOF
>
> The '5' selects the right restore job definitions on my setup, 'yes'
> confirms that the job parameters are correct and 'quit' exits bconsole.
>
> The restore job looked like this (note the 'ifnewer'):
>
> Job {
>  Name = snapshot-restore-job
>  Type = Restore
>  Storage = File
>  Messages = Standard
>  RunBeforeJob = "/etc/bacula/scripts/run-before-job.sh %n"
>  RunAfterJob = "/etc/bacula/scripts/run-after-job.sh %n"
>  Client = machine-cycle-fd
>  FileSet = machine-cycle-fileset
>  Pool = machine-cycle-pool
>  Full Backup Pool = machine-cycle-full-pool
>  Where = /mnt/gigapod/data/snapshot
>  Replace = ifnewer
> }
>
> Mind you, this is bacula 3.0 and I used an admin job for the task, but
> something along these lines would probably work with 1.38 from within a
> regular backup job. I expect that the restore command would be somewhat
> trickier to run too (you may need to emulate interaction in order to
> modify the restore client, etc.)
>
> Hope this helps,
> Avi.
>
>
>> For example in my machine1.conf, I have
>>
>> Job {
>>   Name = "Backup-Machine1"
>>   Type = Backup
>>   Level = Full
>>   Client = machine1-fd
>>   Fileset = "Machine1-Fileset"
>>   Messages = Standard
>>   Storage = Machine1-Storage
>>   Pool = Machine1-Pool
>>   Full Backup Pool = Machine1-Full-Pool
>>   Differential Backup  Pool = Machine1-Diff-Pool
>>   Incremental Backup Pool = Machine1-Inc-Pool
>>   Schedule="Machine1Cycle"
>>   Write Bootstrap = "/var/lib/bacula/Machine1.bsr"
>> }
>>
>> Schedule {
>>   Name = Machine1Cycle
>>   run =Level= Full monthly 1st sun at 4:45
>>   run =Level= Differential weekly 2nd-5th sun at 4:45
>>   run =Level= Incremental mon-sat at 4:45
>> }
>>
>> FileSet {
>>   Name = "Machine1-Fileset"
>>   Include {
>>     Options{
>>       Compression=GZIP
>>       signature=SHA1
>>       wildfile = "*.run"
>>       Exclude = yes
>>     }
>>     File = /home
>>     File = /root
>>     File = /etc
>>     File = /var
>>   }
>>
>> Don't know if this is clear. To sum it up: I want to restore files
>> from the backups on a daily basis. How do I do that (not manually) in
>> my machine1.conf?
>>
>> Thanks for your help :)
>>
>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast and easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> Bacula-users mailing list
>> Bacula-users AT lists.sourceforge DOT net
>> https://lists.sourceforge.net/lists/listinfo/bacula-users
>>
>
>

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
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>