Bacula-users

[Bacula-users] Run a script for a restore job from bconsole

2009-09-29 19:44:35
Subject: [Bacula-users] Run a script for a restore job from bconsole
From: Jose Perez <jvoorhees1 AT gmail DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 29 Sep 2009 18:40:46 -0500
Hi people:

I'm running Bacula 3.0.2 and I have a Restore Job like this:

Job {
  Name = "RestoreFiles"
  Type = Restore
  Client = srv-bacula
  FileSet = "srv-bacula"
  Storage = FileDrive
  Where = /var/data/samba/backups
  Messages = Standard
  Pool = Default
  Run After Job = "/root/scripts/chown-after-restore.sh %c"
}

I created this Job because everytime I want to use the 'restore'
command from bconsole I'm forced to create at least one restore job,
so that's fine, I created the above Restore Job.

Everyday I run restore commands similar to this from bconsole:

restore storage=FileDrive client=pc-admin jobid=140
restoreclient=srv-bacula where=/var/data/restore yes
mark *
done

Ok, this works fine. The restore is done successfully, but the "Run
After Job" isn't being executed with the right parameter as I
expected. bconsole says that run:

/root/scripts/chown-after-restore.sh srv-bacula

... but I tought bacula would get 'pc-admin' as the right parameter
instead of 'srv-bacula', like this:

/root/scripts/chown-after-restore.sh pc-admin

I tried diferent variables (%c, %n) but all of them are being taked
from the resource definition found in bacula-dir.conf instead of the
overwritten options of the bconsole command line.

Is there a way to pass the overwritten parameters to the script of my
Restore Job?

I hope someone can understand even with my bad english to get some help. Thanks

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
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>
  • [Bacula-users] Run a script for a restore job from bconsole, Jose Perez <=