On 2/25/22 17:59, Josip Deanovic wrote:
Several years ago I posted to this list an SQL query that copies only
the jobs that weren't already copied, while starting from the last
successful Full job. The post could still be found in the mailinglist
archives.
I used it when I had to start using Copy jobs but didn't want to
copy the whole pool as it was quite large.
This is what I use:
Job {
Name = "Archive Copy"
Type = Copy
Enabled = Yes
Pool = Full-Disk
Level = Full
Client = ALL
Fileset = DUMMY
Storage = epsilon3-archive
Selection Type = SQL Query
Selection Pattern = "SELECT DISTINCT J.JobId, J.StartTime
FROM Job J JOIN Pool P ON P.PoolId = J.PoolId
WHERE P.Name = 'Full-Disk'
AND J.Type = 'B'
AND J.JobStatus IN ('T','W')
AND J.jobBytes > 0
AND J.StartTime > now() - interval 48 hour"
Messages = Daemon
Priority = 20
Rerun Failed Levels = yes
Allow Duplicate Jobs = no
Cancel Queued Duplicates = yes
Schedule = "Full Backup Archive"
}
This selects every completed Full backup that started in the previous 48
hours for copying. My Full backups run once a month.
--
Phil Stracchino
Babylon Communications
ph...@caerllewys.net
p...@co.ordinate.org
Landline: +1.603.293.8485
Mobile: +1.603.998.6958
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users