[Bacula-users] Need help with about Migration Job and SQLQuery selection
2008-05-02 10:22:34
All, I am trying to setup a Migration job so that the job migrates from the specified Pool the JobIds selected in a SQL query. The manual states
"The exception to this is when Selection
Type = SQLQuery, in which case no Pool is used, unless you
specifically include it in the SQL query. Note, the Pool resource
referenced must contain a Next Pool = ... directive to define
the Pool to which the data will be migrated."
So I understand that the Pool must be included as part of my query. This query from query.sql is very close to what I'd like to achieve. I just lack the SQL knowledge and understanding of Bacula tables to modify it.
:List all backups for a Client after a specified time *Enter Client Name: *Enter time in YYYY-MM-DD HH:MM:SS format: SELECT DISTINCT Job.JobId,Client.Name as Client,Level,StartTime,JobFiles,JobBytes,VolumeName
FROM Client,Job,JobMedia,Media WHERE Client.Name='%1' AND Client.ClientId=Job.ClientId AND JobStatus='T' AND JobMedia.JobId=Job.JobId AND JobMedia.MediaId=Media.MediaId AND Job.StartTime >= '%2'
ORDER BY Job.StartTime;
I'd like to be able to specify the Pool within the query and define the Job.StartTime as being between the current date and 7 days previous. Even if someone who knows this pretty well can get me the Pool selection part, I can probably stumble through the date.
Thanks!
-D
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________
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> |
- [Bacula-users] Need help with about Migration Job and SQLQuery selection,
Mingus Dew <=
|
|
|