How PresSTORE 4.2+ handles expiration dates in Backup
Posted by Sven Koester on 31 August 2007 8:17
When looking in the volume manager at the table of volumes, the column Expiration Date shows:|
In case there is an expiration date shown, this represents the earliest date when the volume may be recycled.
Here is how the expiration date is calculated:
When starting a backup according to some plan, PresSTORE calculates when the employed tape (volume) will no longer be required, based on the number of days till retention that is configured in the plan. A backup cycle is defined as the time (and the data saved) beginning with one full backup and spanning up to the next. Even within a single plan, the length of a cycle can vary depending on the definition of this plan. Every time the plan runs, the expiration date of the volume is moved into the future. The corresponding date is taken to be the expiration date for the volume.
What makes the above calculation convoluted is the fact that multiple backup plans can employ the same volume (actually pool). The plans can have very different retention settings. For example, a plan with a daily full backup and a one day retention will set tomorrow's date as the next recycling date. Another plan with a 90-day retention will set the expiration date three month into the future. Since PresSTORE needs to satisfy both plans in terms of maintaining their data on the volume, the expiration date for the given volume will be such to satisfy the plan whose requested retention date is farthest in the future. This is because a volume can only be recycled completely, overwriting all of its data.
Plan changes after a volume has already been written will not affect the volume's expiration date. However, it may happen, for whatever reason may be, that a backup is not run as planned. In such a case, it may happen that the volume is recycled earlier than expected, since the recycling date had not been adjusted into the future.
An exception to this rule are plans employing the Progressive backup strategy. These plans can be identified in that they run only Incremental Backup to a single pool in each of their schedules. They may not contain a full backup nor employ multiple pools in a schedule. In that case, PresSTORE makes sure that all the files that are being saved and are still "alive" on the file system are saved a second time to a second volume, before it goes and recycles the volume whose expiration date has been reached. Before PresSTORE has had the chance to save all those files, it will not recycle the volume. This is the reason why some volumes are not recycled even though their expiration dates suggest that they may or should be.
Note that the expiration date of a volume may be updated when data is appended to the volume. Every time a backup plan is run, the log of the job displays also the expiration date for each of the volumes used and whether it had been updated or not.
A backup plan is set to a 7 day retention. A full backup is done every Friday. An incremental backup runs and fills the volume on Thursday. Thereby it sets the expiration date to next Thursday. Whether or not the volume will be recycled next Thursday depends on another flag that belongs to the media pool. Volumes may either be recycled as soon as possible (to keep as many volumes unused as possible), or they may be recycled when there are no more volumes available (to keep the data as long as possible). Only volumes carrying the status Full or Closed are candidates for recycling.
A plan runs only incremental backups every day and has a retention time of 4 days. There are two volumes in the pool. Let us assume that it fills the first tape on the fourth day. Thereby, the retention time will be set to four days in the future and will be flagged as full. On the the fifth day, you will notice that the plan will save more data then you would expect an increment to save. This is due to additionally saving everything anew, that had been saved four days ago. IOW, even if the plan should only be picking up the daily changes, it will also additionally be saving everything that has expired according to the number of days for retention. This will leave the impression that it is saving more than it should. Furthermore, even though the expiration date for the first tape may be on the eighth day from the time of it first being written, it will not be recycled, before all the file that are on it and still alive on the file system had been saved to the second tape.