On 2019-11-04 09:16, Phil Stracchino wrote:
> On 2019-11-04 03:30, Radosław Korzeniewski wrote:
>> The Admin job is executed on Director only (Main Reference Manual, The
>> Job Resource):
>> "/An Admin job can be used to periodically run catalog pruning, if you
>> do not want to do it at the end of each Backup Job. Although an Admin
>> job is recorded in the catalog, very little data is saved. The Client is
>> not involved in an Admin job, so features such as “Client Run Before
>> Job” are not available. Only Director’s runscripts will be executed./"
>
> Aaaaaaaah. That would be the detail I've missed. So I can't do my
> post-copy this way.
>
> I suppose I will have to find another way. Perhaps make it a
> ClientRunAfterJob on the catalog backup, or perhaps just change its type.
OK, so, I've rewritten this as a Copy job instead of doing it at the
filesystem level, and that seems so far to be working as desired.
Here's what I've done:
1. Created a new Device on my removable storage pool:
Device {
Name = ArchiveCopy
Device Type = File
Media Type = File
Archive Device = /arcpool
LabelMedia = yes
Random Access = Yes
AutomaticMount = yes
RemovableMedia = no
Requires Mount = no
AlwaysOpen = no
}
2. Created a new Storage using this Device:
Storage {
Name = asgard-archive
Address = asgard.caerllewys.net
Maximum Concurrent Jobs = 20
SDPort = 9103
Password = "XXXXXXXXXXXXXXXXXXXXXXXX"
Device = ArchiveCopy
Media Type = File
}
3. Created a new Pool using that Storage:
Pool {
Name = Full-Archive
Storage = asgard-archive
Pool Type = Backup
Recycle = no
Recycle Oldest Volume = no
Recycle Current Volume = no
AutoPrune = yes
Volume Retention = 365d
File Retention = 365d
Maximum Volume Jobs = 0
Volume Use Duration = 23h
Label Format =
"ARCHIVE-$Year${Month:p/2/0/r}${Day:p/2/0/r}-${Hour:p/2/0/r}:${Minute:p/2/0/r}"
RecyclePool = Scratch
}
4. Modified my current Full backup pool to specify Full-Archive as its
Next Pool and shorten its retention from one year to 40 days:
Pool {
Name = Full-Disk
Storage = asgard-file
Next Pool = Full-Archive
Pool Type = Backup
Recycle = no
Recycle Oldest Volume = no
Recycle Current Volume = no
AutoPrune = yes # Prune expired volumes
Volume Retention = 40d
File Retention = 40d
Maximum Volume Jobs = 0
Volume Use Duration = 23h
Label Format =
"FULL-$Year${Month:p/2/0/r}${Day:p/2/0/r}-${Hour:p/2/0/r}:${Minute:p/2/0/r}"
RecyclePool = Scratch
}
5. The archiving Job uses a SQL Query selection that picks up Full
backups that completed successfully and started within the previous 24
hours (actually, 12 would be plenty), and runs with a priority 5 lower
than the Catalog backup, whi8ch in turn is 5 lower than all of the
client backup jobs:
Job {
Name = "Archive Copy"
Type = Copy
Enabled = Yes
Pool = Full-Disk
Level = Full
Client = ALL
Fileset = DUMMY
Storage = asgard-archive
Selection Type = SQL Query
Selection Pattern = "
SELECT DISTINCT J.JobId, J.StartTime
FROM Job J, Pool P
WHERE P.Name = 'Full-Disk'
AND P.PoolId = J.PoolId
AND J.Type = 'B'
AND J.JobStatus IN ('T','W')
AND J.jobBytes > 0
AND J.StartTime > now() - interval 24 hour"
Messages = Daemon
Priority = 20
Rerun Failed Levels = yes
Allow Duplicate Jobs = no
Cancel Queued Duplicates = yes
Schedule = "Full Backup Archive"
}
And finally the Schedule for the archive job which kicks it off fifteen
minutes after the Catalog backup is scheduled:
Schedule {
Name = "Full Backup Archive"
Run = Full 1st mon at 05:00
}
So, starting at 03:10, my system does a volume cleanup, deleting all
purged volumes. At 04:30, it fires off all of the client backups at
priority 10. At 04:45, the Catalog backup gets added to the queue at
priority 15. Then after another 15 minutes again, the archive job is
added to the queue. After the last Client backup completes, the Catalog
backup runs, and then after the Catalog backup completes, the Archive
Copy job starts and copies all of the just-completed Full backups to the
removable disk set, currently a RAIDZ of four 1TB hot-swap disks.
Nine to twelve days after each full backup cycle, the next OLDER set of
Full backups gets purged, so there is always at least one set of Full
backups online locally. The offline copy in the removable disk pool
will be kept for ... well, depends how many disks I buy. Right now I
have enough spare 1TB disks to retain archive copies for about six
months. But later on I'm planning to replace the 4×1TB RAIDZ sets with
single 2TB disks, or possibly 4TB disks that would give me sufficient
space to also archive all of the Windows client backups offline as well.
(My Windows clients are backed up using Veeam Agent for Windows.)
--
Phil Stracchino
Babylon Communications
[email protected]
[email protected]
Landline: +1.603.293.8485
Mobile: +1.603.998.6958
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users