Bacula-users

Re: [Bacula-users] Bug or Feature Request - Config token too long?

2009-11-24 10:19:32
Subject: Re: [Bacula-users] Bug or Feature Request - Config token too long?
From: Arno Lehmann <al AT its-lehmann DOT de>
To: bacula-users <bacula-users AT lists.sourceforge DOT net>
Date: Tue, 24 Nov 2009 16:16:12 +0100
Hi,

24.11.2009 15:47, Mingus Dew wrote:
> All,
>      Running Bacula 3. on Solaris 10 x86. I'm setting up some Copy jobs 
> using the Selection Type = SQLQuery. When I try to test the config file 
> I get the error:
> 
> bacula@backup_svr: bacula-dir -t -c /opt/csw/etc/bacula/bacula-dir.conf
> 24-Nov 01:51 bacula-dir: ERROR TERMINATION at lex.c:270
> Config token too long, file: /opt/csw/etc/bacula/bacula-dir_jobs.conf, 
> line 757, begins at line 756

Looks like a config token must not span lines.

> My SQLQuery is actually 2 queries on the same line. It works fine in 
> MySQL and I need 2 queries to select jobs from 2 pools in the same Copy 
> Job. Here is the SQL statement
> 
> select distinct Job.JobId,Job.Name from Job,Pool where Pool.Name = 
> 'FS-Incremental_Pool' and Pool.PoolId = Job.PoolId and Job.Type = 'B' 
> and Job.JobStatus in ('T','W') and Job.jobBytes > 0 and Job.StartTime > 
> date_sub(current_timestamp(),interval 7 day) and Job.StartTime < 
> current_timestamp() order by Job.StartTime; select distinct 
> Job.JobId,Job.Name from Job,Pool where Pool.Name = 'FS-Full_Pool' and 
> Pool.PoolId = Job.PoolId and Job.Type = 'B' and Job.JobStatus in 
> ('T','W') and Job.jobBytes > 0 and Job.StartTime > 
> date_sub(current_timestamp(),interval 7 day) and Job.StartTime < 
> current_timestamp() order by Job.StartTime;
> 
> This is the only method I can use as the other methods for selecting Job 
> ID's for Copying don't fit my environment. I'd prefer not to split the 
> copying of Incrementals and Fulls into different Jobs.

It should be possible to create on query, but I don't know how right 
now :-)

I haven't checked the actual length of your queries, but if they 
really exceed Baculas built-in limit, you might want a function 
defined in the catalog database. Should be possible with PostgreSQL 
and MySQL, as far as I know.

Cheers,

Arno

> Thanks,
> Shon
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users

-- 
Arno Lehmann
IT-Service Lehmann
Sandstr. 6, 49080 Osnabrück
www.its-lehmann.de

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
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>