Bacula-users

Re: [Bacula-users] Need some help with copy jobs

2012-01-16 18:03:59
Subject: Re: [Bacula-users] Need some help with copy jobs
From: Joe Nyland <joenyland AT me DOT com>
To: "bacula-users AT lists.sourceforge DOT net" <bacula-users AT lists.sourceforge DOT net>
Date: Mon, 16 Jan 2012 23:01:35 +0000
Thanks for the explanation Andrian.

In the meantime, I've given the 'PoolUncopiedJobs' option a go, and it appears 
to work just as well as the SQL query that I originally included in my email. 
However, Im still stuck in the loop mentioned earlier - I still appear to be 
copying two jobs, then when the copy job is run again, I get two other jobs 
copied, which seem to overwrite the previous two jobs in my 'copied' pool. Thus 
the next time the copy job is run the first two jobs are run again. And so on...

Can anyone offer any pointers why I might be seeing this behaviour. The volume 
retention is set to 1 week on my 'copied' pool. As I understand it, jobs which 
have been written to the copied pool should not be overwritten, until 1 week 
has passed. Am I wrong?

Thank you. 

Joe


Sent from my iPhone

On 16 Jan 2012, at 18:01, Adrian Reyer <bacula-lists AT lihas DOT de> wrote:

> On Mon, Jan 16, 2012 at 01:23:37PM +0000, Joe Nyland wrote:
>> However, I am still unable to see what this query is doing :-(. If I run it 
>> against my catalogue DB, I just get a long list of JobIDs, which don't look 
>> right for my SVN_Full pool. I have a feeling I may be over complicating 
>> thigs using a SQL query?
> 
> Well, this special SQL selects all jobs of any pool that is not the
> 'ARCH' pool. In your case, as you only wish to copy a specific pool, it
> would be, still with 'ARCH' as the target pool:
> 
> select a.JobId from Job AS a JOIN Pool AS b
> ON a.PoolId=b.PoolId AND b.Name='SVN_Full' AND b.Name!='TAPE'
> WHERE a.Type='B' AND a.JobID NOT IN
> (SELECT PriorJobId FROM Job AS c JOIN Pool AS d
> ON c.PoolId=d.PoolId AND d.Name='ARCH')
> AND a.EndTime>(now()-INTERVAL '10 DAY') ORDER BY a.StartTime ASC;
> 
>> PoolUncopiedJobs
>>   This selection which copies all jobs from a pool to an other pool
>> which were not copied before is available only for copy Jobs.
>> What are the pro's/con's with this option, over a SQL query, such as the one 
>> kindly suggested by Adrian Reyer a few days ago?
> 
> I have not used this option because of my special setup as I have to
> copy each original job twice. This is only possible with SQL. For you it
> might just work.
> 
> Regards,
>    Adrian
> -- 
> LiHAS - Adrian Reyer - Hessenwiesenstraße 10 - D-70565 Stuttgart
> Fon: +49 (7 11) 78 28 50 90 - Fax:  +49 (7 11) 78 28 50 91
> Mail: lihas AT lihas DOT de - Web: http://lihas.de
> Linux, Netzwerke, Consulting & Support - USt-ID: DE 227 816 626 Stuttgart

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users