at first I would like to thank the authors for their work!
I have a bunch of questions.
My situation:
I have many defined jobs for backing up the server. They are
scheduled on mothly basis:
first sat of month -> full backups
every other sat -> differential backups
all other days -> incremental backups
All backups are going to the pool "QuickPool" (PoolId=4) stored on
the backup server's internal HDD. Every sunday
I migrate all the full and diff backups to the pool "ArchivePool" (PoolId=5)
stored on an external USB disk (manually unmounted after succesfull migration).
It's done with this job [displaying only relevant fields]:
Job {
Name = "MoveToUsbDisk"
Type = Migrate
Selection Type = SQLQuery
Selection Pattern = "select JobId from Job where (level=\"F\" or level=\"D\") and JobStatus=\"T\" and PoolId=4 and PurgedFiles=0;"
}
**
Migration seems to work OK. Can you please ensure me that the migration method is right?
**
The problem is that the obsolete incremental backups remain in the
"QuickPool" pool (internal disk).
**
The solution could be to define the retention periods but I didn't understand well
how to do it right. Should I set the job retention, volume retention or what? Where
precisely (pool definition?) and what values?
**
The inconvenient think with the retention time is that in the case of some error (e.g. some backups
not migrated), I could loose some important backups...
I've googled up the Phil Stracchino's suggestion for "Automatically purge obsoleted jobs"
(
http://osdir.com/ml/bacula.user/2003-04/msg00106.html ).
That's precisely what I want and it could be realized with a simple thing: purging jobs according
to the SQL selection of JobId-s. The SQL statement for me would be (I think):
select JobId from Job where Name="SomeJobName" and PoolId=4 and StartTime<(select max(StartTime)
from Job where Name="SomeJobName" and Level="F" and JobStatus="T" and PoolId=5);
This statement should return the ids of the incremental backups present in the QuickPool (id=4)
which are older then the newest full backup of the same name present in the ArchivePool (id=5).
**
Is it possible to somehow purge all jobs with PoolId-s returned by this SQL statement?
**
Thank you very much for any suggestions...
M. Prymek