Retention Use Case

Learn about the Trilio retention workflow using an example retention policy

Let's assume a backup schedule policy of an application is to perform a backup every 12 hours daily for the last 6 years. Following is the retention policy defined by the user:

Latest = 3
Weekly = 5
DayOfWeek = wednesday
Monthly = 12
DateOfMonth = 15
Yearly = 5
MonthOfYear = March

Latest Retention: The latest retention of backup is 3, according to our backup policy we are taking 2 backups every day. For a user, the last 3 days backups are 6 backups:

 2020-09-12 12:08:41.197980
 2020-09-12 00:08:41.197980
 2020-09-11 12:08:41.197980
 2020-09-11 00:08:41.197980
 2020-09-10 12:08:41.197980
 2020-09-10 00:08:41.197980

Now according to the latest retention, we have to retain the 3 backups and it should be 3 latest backups.

 2020-09-12 12:08:41.197980
 2020-09-12 00:08:41.197980
 2020-09-11 12:08:41.197980

Weekly Retention: The weekly retention is 5 and the day of the week to retain is Wednesday. This weekly retention will trigger after the latest retention is completed. According to the policy, we need to retain the backup every Wednesday for 5 consecutive weeks after the latest retention is done. Trilio will keep the latest backup of the day, and the older backup of the day coalesces into the latest one.

  2020-09-09 12:08:41.197980 (Week's retention after the latest retention is completed)
  2020-09-02 12:08:41.197980
  2020-08-26 12:08:41.197980
  2020-08-19 12:08:41.197980
  2020-08-12 12:08:41.197980

Monthly Retention: The Monthly retention is set to 12 and the date of the month is the 15th. This monthly retention will happen after the weekly retention is done. According to the policy, we need to retain the backup for each month on the 15th. Trilio will re-evaluate the policy, and keep the backup of Wednesday (weekly policy) in the week of the 15th.

For example, If the 15th of the month falls on Thursday, we will retain the backup of the 14th which happens to fall on Wednesday.

 2020-07-15 12:08:41.197980 (Month's retention after the weekly retention is completed)
 2020-06-17 12:08:41.197980
 2020-05-20 12:08:41.197980
 2020-04-15 12:08:41.197980
 2020-03-18 12:08:41.197980
 2020-02-19 12:08:41.197980
 2020-01-15 12:08:41.197980
 2019-12-18 12:08:41.197980
 2019-11-20 12:08:41.197980
 2019-10-16 12:08:41.197980
 2019-09-18 12:08:41.197980
 2019-08-14 12:08:41.197980

Yearly Retention: The yearly retention is 5, and the date of the year to retain is 15th March. This yearly retention will happen after the monthly retention is done. According to policy, we need to retain 1 backup of each year for 5 years of 15th of March. After re-evaluation, Trilio would keep the backup from Wednesday (weekly retention) for the week in which 15th March falls.

For example, 15th March comes on Monday then the retention will happen on the 17th March which is on Wednesday.

 2019-03-20 12:08:41.197980 (Yearly retention after monthly retention is completed.)
 2018-03-14 12:08:41.197980
 2017-03-15 12:08:41.197980
 2016-03-16 12:08:41.197980
 2015-03-18 12:08:41.197980

In the above example, you can see the 2020 March backup was in monthly retention not in yearly retention.

  • As time goes by, Trilio will retain the newer backups and will coalesce the older backups.

  • Tomorrow, when a new backup is available, the backups from the previous two days will coalesce into 1 backup.

  • Similarly, when the following week's backup is created, the previous two weeks' backups will have coalesced into 1 backup and we would retain 1 backup every month and coalesce the last two monthly backups into a single backup.

  • When the monthly backup schedule goes beyond the March 2020 backup, the last monthly backup available is for April 2020, then the yearly retention will kick in to save the March 2020 (until now it was saved as monthly backup) backup as the yearly backup. The backups of 2014 and 2015 will be coalesced to keep the yearly retention within the limit.