PLEASE HELP
Il giorno gio, 10/05/2012 alle 09.28 -0700, Tim Krieger ha scritto: > I think you have two options... > > Probably the simplest and most straight forward would be to create a copy job > for each pool, then a simple SQL select query for that pool to grab the > latest full backup. This seems to be consistent with the rest of your > configuration and probably the recommended way to go. This is a huge work. > However, if all of your pools have the same storage = defined for them you > can probably get away with a single SQL query that will grab the required > backups. Something like the following query : > > SELECT max(j.jobid) AS jobid, j.name, max(j.starttime) AS starttime FROM job > j WHERE j.type = 'B' AND j.level = 'F' AND (j.jobstatus = ANY (ARRAY['T', > 'W'])) AND NOT (j.jobid IN (SELECT job.priorjobid FROM job WHERE (job.type = > ANY (ARRAY['B', 'C'])) AND (job.jobstatus = ANY (ARRAY['T', 'W'])) AND > job.priorjobid = 0)) GROUP BY j.name ORDER BY max(j.jobid); > > > Do test the query in your DB to ensure it returns the expected list of backup > jobs, if I understand the bacula DB correctly, this should give you the > latest Full(highest job ID number with level F and type B) backup job for > every unique job name. You may want to add some more restrictions like a > list of what pools you want jobs selected from, or a list of job names to > limit your selection to. Poke around in the bacula db tables and I'm sure > you'll get the idea pretty quick. I have one Device defined (in bacula-sd.conf) for each Pool. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users