I've decided to write my on SQL QUERY to just copy jobs that haven't been
copied in the last 24 hours (disk to tape backup follows on the heels on the
disk to disk backup). I wanted to just keep the same JOB for disk to tape copy
but us a SQL QUERY instead of the PoolUncopiedJobs. But I need to use the POOL
name that is supplied in our SCHEDULE setup (incremental, differential, full).
Here is the query, but of course it doesn't work and I was hoping someone could
enlighten me on how to accomplish it. Thanks.
Selection Type = SQLQuery
Selection Pattern = "
SELECT J.JobId
FROM Job J, Pool P
WHERE P.Name = ${Pool}
AND P.PoolId = J.PoolId
AND J.Type = 'B'
AND J.JobStatus IN ('T','W')
AND J.JobBytes > 0
AND J.StartTime >= NOW() - INTERVAL '24 hours'
AND J.JobId NOT IN (SELECT PriorJobId FROM Job
WHERE Type IN ('B','C')
AND Job.JobStatus IN ('T','W')
AND PriorJobId != 0)
ORDER BY J.JobId;"
Steven Hammond
I.T. Manager
Technical Chemical Company
For support, please email us at [email protected].
From: Kern Sibbald [mailto:[email protected]]
Sent: Monday, January 13, 2014 11:06 AM
To: Steven Hammond
Cc: [email protected]
Subject: Re: [Bacula-users] Copy job limit is 100?
Hello,
I don't use Copy/Migration though I did program them and am working on exactly
those files at the moment, so it would be better if someone from the list
answers.
Bacula doesn't have a concept of expiring jobs. I guess you mean the retention
period has expired. Until jobs are actually pruned, Bacula will see them in the
catalog and depending on the Copy type you use, they may be copied again
and again. If I remember right there is an UnCopied jobs which will limit
Bacula
to working with jobs that have not previously been copied.
Thanks for using Bacula.
Best regards,
Kern
On 01/13/2014 03:49 PM, Steven Hammond wrote:
Not a problem. However, I need to ask a really dumb question. I keep putting
in backup tapes (blank) to copy the jobs but the # of jobs seems to continue to
grow (even though I've not run any additional disk backups). These are daily
incrementals (Mon-Thu) and they expire after 5 days. What happens when they
expire? If they are pruned, does that mean the disk jobs I marked UNCOPIED
again? Thanks for a great product!
Steven Hammond
I.T. Manager
Technical Chemical Company
For support, please email us at
[email protected]<mailto:[email protected]>.
From: Kern Sibbald [mailto:[email protected]]
Sent: Saturday, January 11, 2014 1:16 AM
To: Paul De Audney
Cc:
[email protected]<mailto:[email protected]>
Subject: Re: [Bacula-users] Copy job limit is 100?
Hello,
The reason this artificial limit is there is that because I saw several
cases of copy/migrate jobs starting on the order of 600 jobs, which
caused the systems in question to totally choke up. It was probably
a combination of insufficient hardware for 600 jobs, and much too
high limits placed on the maximum number of Storage daemon jobs.
In retrospect, setting it to 100 was probably a bad idea. I am sorry
for the problems you are having.
It is probably better to have a directive or to add additional
documentation that explains the downside of possibly starting
a huge number of jobs at the same time or possibly a different
algorithm. I will find some suitable fix in the next version, which
will be released in March. In the mean time, you can change the
source code to set the limit to a larger value and rebuild from source.
The limit is in file
src/dird/migrate.c
at line 673 and it reads:
int limit = 99; /* limit + 1 is max jobs to start */
Or you can use a special SQL statement as a number of users have
suggested.
Best regards,
Kern
On 01/10/2014 11:20 PM, Paul De Audney wrote:
On 9 January 2014 12:54, Steven Hammond
<[email protected]<mailto:[email protected]>> wrote:
I missed a couple of days (holidays) backing up from disk to tape (we backup
disk to disk every night) so when I went to run the job to copy disk to tape it
only grabbed 100 jobs. This seems sort of artificial (what if I had more than
100 workstations/servers I was backing up?). I was wondering if there is
something to set that will override that setting (I couldn't find one at a
cursory glance). I would prefer not to use a special query if possible (we are
using PoolUncopiedJobs). I know how to write a query and have one already that
I use to see how many jobs need to be backed up. I'm just curious how others
are getting around this artificial limit. Thanks.
I am currently using a custom SQL query to copy jobs. I do this because we have
different backup schedules for various systems. I find the SQL query does give
me more control over what jobs get copied and when.
Unfortunately when I originally configured bacula, I setup the backups for
incremental and full backups for all hosts to be written into a single pool for
disk based backups.
So if I use pooluncopiedjobs I will end up copying all my incremental backups
to tape.
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Bacula-users mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/bacula-users
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users