Bacula-users

Re: [Bacula-users] [RESOLVED] Mini stupid how-to restore mark all .bak file

2009-01-20 12:05:13
Subject: Re: [Bacula-users] [RESOLVED] Mini stupid how-to restore mark all .bak file
From: Foo <bfoo33 AT yahoo.co DOT uk>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 20 Jan 2009 18:02:45 +0100
On Tue, 20 Jan 2009 14:45:37 +0100, Bruno Friedmann <bruno AT ioda-net DOT ch>  
wrote:

> We want to restore some type of files for a determined client and we  
> have define which jobid we need.
> (you can always adjust what you need ..)
>
> First we create a script for bconsole
> called mybscript
>
> restore
> 3
> 9876,9877             <- this is the jobid or jobids
> find *.log            <- the pattern searched
> unmark *              <- be sure to have nothing marked
> done                  <- close restore
> quit                  <- exit bconsole
>
> So we launch our script by issuing a
>
> cat mybscript | bconsole > /tmp/my_file_searched
> (you could use tail or what you want to have the output redirected ... )
> Just check that the bacula dir user could cat this output file.
>
> After we edit this file to cut all lines concerning bconsole message.
> (if your log file is too big to be directly edited so can use head &  
> tail to cut it cf to man)

To automate that:

cat /tmp/mybscript | bconsole | awk '/\$ unmark/{p=0};p;/\$ find/{p=1};'  
>/tmp/my_file_searched

This assumes that there will be exactly one instance of "$ find" and "$  
unmark" in the file, so don't add more find statements to 'mybscript'.

> After we launch the restore
> echoing to bconsole or directly in bconsole (this will permit to change  
> destination, level, runtime etc...)
>
> bconsole
> restore client=YOUR-fd jobid=9876,9877 file=</tmp/my_file_searched
>
> the rest is normal operation like describe in documentation
>
>
> That's all folks.
>
> This procedure is LGPL licenced.

My addition is public domain ;)


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users