We have separate pools for each level (incremental, differential, full).  I 
have 1 schedule and 1 job for the disk to tape copy and was just trying to keep 
it that way.  I know I could create separate jobs/schedules.  I'm open to 
suggestions.  Here is the current configuration for the disk to tape copy:

JobDefs {
        Name = Default-Disk-to-Tape-Job
        Type = Copy
        Schedule = Disk-to-Tape-Schedule
        Client = None
        Fileset = None
        Pool = Daily-Incr
        Storage = File
        Messages = Standard

        Priority = 90

        Spool Data = no
        Spool Attributes = yes

}

job {
        Name = Disk-to-Tape
        JobDefs = Default-Disk-to-Tape-Job
        Selection Type = SQLQuery
        Selection Pattern = "
                SELECT J.JobId
                    FROM Job J, Pool P
                    WHERE P.Name = 'Daily-Incr'  <== Hardcoded for now just to 
get it to work
                      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;"
}

Schedule {
  Name = Disk-to-Tape-Schedule
  Run = Level=Full Pool=Monthly-Full FullPool=Monthly-Full 1st fri at 22:00
  Run = Level=Differential Pool=Weekly-Diff DifferentialPool=Weekly-Diff 
2nd-5th fri at 22:00
  Run = Level=Incremental Pool=Daily-Incr IncrementalPool=Daily-Incr mon-thu at 
22:00
}

Thanks for any assistance.  I'm still relatively new to Bacula but have enjoyed 
the learning experience.

Steven Hammond
I.T. Manager
Technical Chemical Company

For support, please email us at supp...@technicalchemical.com.


-----Original Message-----
From: Uwe Schuerkamp [mailto:uwe.schuerk...@nionex.net] 
Sent: Tuesday, January 14, 2014 8:30 AM
To: Bacula Users Mailing List
Subject: Re: [Bacula-users] Variable Expansion in SQL QUERY

On Tue, Jan 14, 2014 at 02:17:12PM +0000, Steven Hammond wrote:
> 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.
> 
 
Dumb question: Why don't you select by JobLevel? Are you copying to
separate pools? 

All the best, Uwe

-- 
NIONEX --- Ein Unternehmen der Bertelsmann SE & Co. KGaA



------------------------------------------------------------------------------
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
Bacula-users@lists.sourceforge.net
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
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to