2013/1/19 Adrian Reyer
<bacula-lists AT lihas DOT de>
On Fri, Jan 18, 2013 at 04:00:47PM +0200, Florian Heigl wrote:
> ssh client-to-backup -n bconsole "run a backup for this box and keep
> sitting until the backup is completed"
Something like this should do the trick:
echo "run job=XY yes
wait job=XY" | ssh client-to-backup bconsole
> How do you automate your off-schedule backups?
this was what I was looking for! Below for the curious or google's hunger.
I've tested it and it works as it should. I've added a level=Incremental to it.
+ bconsole
Connecting to Director xx:9101
1000 OK: xx-dir Version: 5.0.3 (30 August 2010)
Enter a period to cancel a command.
Using Catalog "MyCatalog"
Job queued. JobId=7206
You have messages.
JobId=7206
JobStatus=OK (T)
Now i'm thinking about how to safely wrap around it - I need to respect the jobs status.
- if it didn't back up successful then my batch should abort, so I need to squeeze some return code from it.
I think I'll go the really easy way now by screenscraping the JobStatus=OK from here.
Nothing wrong about it since I'd rather abort on any unexpected situation.
So the question ends with:
Anything goes wrong, I get an according error from the grep.
I thought about skipping the backup if it's not needed, i.e. because the last ran 2 hours ago.
That part i'll not bother with for now :)
(If you're really picky you'll see I've not yet split out the OS level backups, thats the really hard part still ;)
Many thanks & Greetings to Stuttgart,
Florian
--
the purpose of libvirt is to provide an abstraction layer hiding all xen features added since 2006 until they were finally understood and copied by the kvm devs.