Bacula-users

Re: [Bacula-users] One Copy Job for ALL Clients?

2011-09-11 23:32:36
Subject: Re: [Bacula-users] One Copy Job for ALL Clients?
From: Rodrigo Renie Braga <rodrigorenie AT gmail DOT com>
To: Jim Barber <jim.barber AT ddihealth DOT com>
Date: Mon, 12 Sep 2011 00:30:22 -0300

Ok, new problem...

I run my Full Backup monthly, on the First Monday of the month... And I need to run the Copy Job every Thursday, because on Friday will have a routine for taking these copy jobs tapes to a secure offsite location.

The problem is that in some cases, the first Thursday comes first than the first Monday (just see November on the calendar), so the Copy Job of that Thursday will copy the tapes from the previous month, not the current (because the first Monday didn't arrived yet to run the Full Backup)...

So, what do I do? Should I completely change my Schedules?

Thanks!


2011/9/11 Rodrigo Renie Braga <rodrigorenie AT gmail DOT com>
Very good, I'll give it a try... Thank you!!!


2011/9/11 Jim Barber <jim.barber AT ddihealth DOT com>
On 12/09/2011 10:26 AM, Rodrigo Renie Braga wrote:
> Hello everyone.
>
> In my first attempt using Copy Jobs, I was creating one Copy Job for each of my Clients, with the following SQL Selection Pattern:
>
>         SELECT max(JobId)
>              FROM Job
>             WHERE Name = 'someClientJobName'
>               AND Type = 'B'
>               AND Level = 'F'
>               AND JobStatus in ('T', 'W')
>               AND JobBytes > 0;
>
> Basically, every Client had 2 Jobs: one for a normal daily Backup and one for copying it's last Full Backup, using the above SQL Query.
>
> My question is: do I really need to create a different Copy Job for every Client or can I use only ONE Copy Job that Selects the
> latest Full Backup JobID of all my clients?

I have my full backups go to their own pool.
Then I have just one copy job defined like so:

Job {
 Name = "OffsiteBackup"
 JobDefs = "DefaultJob"
 Type = Copy
 Level = Full
 # Uses the 'Next Pool' definition from FullPool for where to write the copies to.
 Pool = FullPool
 # Use SQL to select the most recent (successful) Full backup for each job written to the FullPool pool.
 Selection Type = SQLQuery
 Selection Pattern = "SELECT MAX(Job.JobId) FROM Job, Pool WHERE Job.Level = 'F' and Job.Type = 'B' and Job.JobStatus = 'T' and
Pool.Name = 'FullPool' and Job.PoolId = Pool.PoolId GROUP BY Job.Name ORDER BY MAX(Job.JobId);"
 Allow Duplicate Jobs = yes
 Allow Higher Duplicates = no
}

So that SQL formatted over multiple lines for easier reading is:

SELECT
       MAX(Job.JobId)
FROM
       Job, Pool
WHERE
       Job.Level = 'F'
       and Job.Type = 'B'
       and Job.JobStatus = 'T'
       and Pool.Name = 'FullPool'
       and Job.PoolId = Pool.PoolId
GROUP BY
       Job.Name
ORDER BY
       MAX(Job.JobId);

Regards,

----------
Jim Barber
DDI Health


------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
_______________________________________________
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>