Hello, A kludge, which I don't like much, would be to move the definition of Pool into the common part of the jcr.
A much better solution, would be to enhance the Python scripting interface to include all the variables you want. Most likely all except %s (Since) are implemented, so it wouldn't be very hard. See src/dird/pythondir.c (if I remember the name correctly), then just duplicate the code necessary. Since Python can already submit a run command, the rest should be rather easy and in the long run, much more powerful. On Thursday 17 November 2005 17:16, Alexander Bergolth wrote: > Hi! > > I'd like to use the new Run-directive in the Job Resource to define a > job that should be run after the main backup-job. (This job should > backup the bacula database directory and is called BackupCatalog.) > > However, since my schedule uses daily incremental backups that go to a > "PoolDaily" during the week, weekly full backups that go to "PoolWeekly" > and monthly full backups that go to "PoolMonthly", I'd like to specify > the BackupCatalog-Job to use the same pool as the main backup job and > hence use the same tape. > > I'd like to use a variable like "%p" that is substituted for the pool, > that the current job is using, to allow starting the BackupCatalog-job > like that: > > Job { > Name = "Samba-Homes" > Schedule = "WeeklyCycle" > [...] > Run = "BackupCatalog level=%l since=\"%s\" storage=DLT1 pool=%p" > } > > I've found out that "%v" is substituted by the volume-name in > edit_job_codes() (in lib/util.c) but it looks like there is no variable > for the pool. > > So I tried to add this feature using the attached patch. > However, it doesn't compile because the pool attribute is only compiled > into the class JCR, if DIRECTOR_DAEMON is defined. (See jcr.h) > Unfortunately, when lib/util.c is compiled, DIRECTOR_DAEMON isn't > defined. So jcr->pool isn't available at compile time in > edit_job_codes(). However, since jcr is passed from is passed from > do_backup_init() in dird/backup.c, it should be available at run-time. > > I'd appreciate any hint at how to solve the problem... > > Cheers, > --leo ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users