Expire backups with multiple point-in-time restores
If you perform more than one point-in-time restores, multiple timelines for backups exist.
The following figure shows three timelines with their backups.
In this example, the second timeline begins with a point-in-time restore to backup 1. The second timeline consists of backups 1, 5, 6, 7, and 8. The third timeline (in bold) consists of backups 1, 5, and 9. The third timeline is considered the current timeline because it contains the latest backup.
When you run the onsmsync utility to expire old backups, onsmsync removes the old backups from the current timeline, and make sure that the current timeline is restorable from the backup objects that are retained. All other backups that are not in the current timeline are also expired but onsmsync does not make sure that the other timelines are restorable from the objects retained.
- Apply the expiration policy on all sets of backup objects.
- Unexpire backup objects that belong to the current timeline.
- Apply the expiration policy on the current timeline to ensure that the current timeline is restorable.
At the same time, the expiration policy is applied to backups in other timelines.
For example, if you execute the onsmsync -g 2 command on the example in the previous figure, backup 1 from the current timeline is expired, and backups 2, 3, 4, 6, and 7 from the first and second timelines are expired. Backups 1, 5, and 9 from the current timeline are retained. Backup 8 is retained from other timelines.