Bacula-users

Re: [Bacula-users] Copy tape job for offsite - best practices

2015-07-31 10:32:42
Subject: Re: [Bacula-users] Copy tape job for offsite - best practices
From: Bill Arlofski <waa-bacula AT revpol DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Fri, 31 Jul 2015 10:31:01 -0400
On 07/30/2015 07:01 PM, Josip Deanovic wrote:
> I have played with the  "SelectionType = PoolUncopiedJobs" option some
> time ago and have found it problematic because the first time you use it
> it will copy every job existing in the database which is not yet copied.

Hi Josip,

The way it should work per the documentation is that only un-copied jobs in
the specified _pool_ will be copied, not all un-copied jobs in the catalog
_database_.

Perhaps when you tried that option you made the same mistake as I did when
copy jobs were first introduced: On my first attempts, I mistakingly tried to
use that directive on a pool which I had been using for years. Of course,
there were many jobs in the pool, and of course the first attempts to use the
simple "PoolUncopiedJobs" selection triggered thousands of copy jobs - much to
my chagrin. :)

Not fully understanding the problem at the time, I immediately switched to a
SQL selection for each job I wanted to copy after my nightly jobs ran, like:

(for mysql)
Selection Pattern = "SELECT JobId FROM Job WHERE Type='B' AND Name LIKE
'_xxxJobNamexxx_' AND JobStatus='T' AND RealEndTime >= DATE_ADD(NOW(),
INTERVAL -24 HOUR);"

(for postgresql)
Selection Pattern = "SELECT JobId FROM Job WHERE Type='B' AND JobStatus='T'
AND Name='_xxxJobNamexxx_' AND RealEndTime >= (current_timestamp - interval
'24 hours');"


This is why I recommended that Robert create a new pool (or pools) for weekend
jobs. He will be starting with a fresh pool, and the copy job should only
trigger copies for what he expects right from the start.


I hope this helps someone to avoid the problems I had initially with copy jobs
and the PoolUncopiedJobs selection type. :)



Bill


-- 
Bill Arlofski
http://www.revpol.com/bacula
-- Not responsible for anything below this line --

------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users