On Thu, Nov 06, 2008 at 01:14:44PM +0200, Pasi Kärkkäinen wrote:
> On Wed, Nov 05, 2008 at 01:00:19PM +0100, Ulrich Leodolter wrote:
> > On Wed, 2008-11-05 at 13:38 +0200, Pasi Kärkkäinen wrote:
> > > On Tue, Nov 04, 2008 at 10:21:54PM +0100, Ulrich Leodolter wrote:
> > > >
> > > > Job {
> > > > Name = "CopyDiskToTape"
> > > > Type = Copy
> > > > Client = dir-fd
> > > > Level = Full # must be defined, but is ignored
> > > > FileSet = "Full Set" # must be defined, but is ignored
> > > > Pool = DiskBackup
> > > > Storage = File
> > > > Messages = Standard
> > > > Selection Type = PoolUncopiedJobs
> > > > Maximum Concurrent Jobs = 10
> > > > # SpoolData = yes
> > > > }
> > > >
> > > >
> > > > PoolUncopiedJobs is based on an SQLQuery i posted in the devel list.
> > > > i am running 2.5.17 svn at the server side
> > > >
> > >
> > > Btw could you post the subject of that email, or archive link to it..
> > > I could't find it with some searching..
> > >
> >
> > My initial posting
> > [Bacula-devel] Copy Jobs Selection
> >
> > Implemented by Marco van Wieringen <[EMAIL PROTECTED]> as noted in
> > [Bacula-devel] Implementation of acls and extended attributes
> >
>
> OK, it looks like 'PoolUncopiedJobs' Selection Type is included in 2.5 SVN
> version
> of Bacula, based on this email:
>
> "[Bacula-devel] Implementation of acls and extended attributes":
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg03471.html
>
> "- support for copy jobs that help for disk-to-disk-to-tape backups
> (implemented in bacula as the pooluncopiedjobs copy job
> which implements a SQL query first send to the bacula list by
> Ulrich Leodolter)"
>
>
> Your initial posting:
>
> "[Bacula-devel] Copy Jobs Selection":
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg02398.html
>
> But I'm still confused what is the exact SQL query that will be used..
>
> Basicly I have a lot of jobs in the catalog/database, that have been ran,
> but the data/files of those jobs doesn't exist anymore on the disk volumes..
> because of automatic disk volume recycling.
>
> so I need to copy only the jobs that still are on disk volumes..
>
> I guess I should take a look at the code:)
>
Found it.
src/dird/migrate.c:
const char *sql_jobids_of_pool_uncopied_jobs =
"SELECT DISTINCT Job.JobId,Job.StartTime FROM Job,Pool"
" WHERE Pool.Name = '%s' AND Pool.PoolId = Job.PoolId"
" AND Job.Type = 'B' AND Job.JobStatus = 'T'"
" AND Job.JobId NOT IN"
" (SELECT PriorJobId FROM Job WHERE"
" Type = 'B' AND Job.JobStatus = 'T'"
" AND PriorJobId != 0)"
" ORDER by Job.StartTime";
and find_jobids_of_pool_uncopied_jobs() function.
Running that query manually with mysql client gives correct looking jobids
(and correct looking amount of them).
So I guess I'll try it for real:)
Thanks!
-- Pasi
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users