Re: [Bacula-users] Non-interactive restore
On Thu, 9 Aug 2012 16:58:32 +0100 Gary Stainburn wrote: > Hi folks. > > Google has burried me once again as this seems to be a recurring > question. > > What is the best method of starting a restore without an interactive > interface. Basically, I want to be able to start a restore of the > last backup state (option 5) for a client, specifying a difference > restoreclient. > > In an idea world I'd like to run a script after a successful > completion. > > I've tried: > restore all client=gary-fd restoreclient=eddie-fd > > but it still asks for a resture type which I want to default to 5 and > then asks me for a FileSet resource. I now only have one fileset > resource for Linux but it still insists on giving me two choices > including one I no long have in the config files. > > Gary > echo "restore client=$HOST-fd where=$where_you_want restoreclient=$FD_TO_RESTORE_TO bootstrap=/var/lib/bacula/$HOST-fd.bsr select current all done yes" | bconsole > /dev/null That is what I use. It restores everything from though the latest backup with out me telling it what to do. Fair warning. Running several of these at a time in parallel has caused my DIR to lockup several times with not warning. -- Craig Van Tassle HUBzero.org System Administrator YONG 1006 Desk Phone : (765)496-6413 -- 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Non-interactive restore
On Thu, Aug 09, 2012 at 04:58:32PM +0100, Gary Stainburn wrote: > Hi folks. > > Google has burried me once again as this seems to be a recurring question. > > What is the best method of starting a restore without an interactive > interface. Basically, I want to be able to start a restore of the last > backup state (option 5) for a client, specifying a difference restoreclient. > > In an idea world I'd like to run a script after a successful completion. > > I've tried: > restore all client=gary-fd restoreclient=eddie-fd > > but it still asks for a resture type which I want to default to 5 and then > asks me for a FileSet resource. I now only have one fileset resource for > Linux but it still insists on giving me two choices including one I no long > have in the config files. > > Gary Hi Gary, you could brute-force your way into running a restore by doing lots of echos answering bconsole's restore questions like so (from memory): ( echo "restore"; echo "mod" ; echo "3"; echo ; echo "yes") | bconsole of course you'd have to keep track of changing client and fileset index numbers as your dir config changes. You should be able to remove the "ghost fileset" using mysql and deleting the appropriate table row in your bacula db. HTH, Uwe -- 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] Non-interactive restore
Hi folks. Google has burried me once again as this seems to be a recurring question. What is the best method of starting a restore without an interactive interface. Basically, I want to be able to start a restore of the last backup state (option 5) for a client, specifying a difference restoreclient. In an idea world I'd like to run a script after a successful completion. I've tried: restore all client=gary-fd restoreclient=eddie-fd but it still asks for a resture type which I want to default to 5 and then asks me for a FileSet resource. I now only have one fileset resource for Linux but it still insists on giving me two choices including one I no long have in the config files. Gary -- Gary Stainburn Group I.T. Manager Ringways Garages http://www.ringways.co.uk -- 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users