Skip to main content

Backup Lifecycle & Housekeeping

This section will help you understand the components and functionality of backup lifecycle with CxLink Backup.

Topics

Overview

The configuration can be found in the emory.cfg configuration file in the following format:


_15
LifeCycle:
_15
active: true
_15
Log:
_15
Retention: 15
_15
Daily:
_15
Retention: 15
_15
Weekly:
_15
CronExpression: 0 0 * * 0
_15
Retention: 90
_15
Monthly:
_15
CronExpression: 0 0 1 * *
_15
Retention: 120
_15
Yearly:
_15
CronExpression: 0 0 1 1 *
_15
Retention: 720

Configure Backup Lifecycle

Follow these steps to configure the CxLink Backup lifecycle before you start performing your backups.

  1. Start emory settings tool by executing /opt/emory/emory as <sid>adm
  2. Select Lifecycle from the main menu.

_10
? CxLink Backup: [Use arrows to move, type to filter]
_10
Storage Providers profiles
_10
Data storage providers for backups & restores
_10
Specific Database configuration for Oracle database
_10
License Software
_10
Logging settings
_10
Syntax Backups Dashboard
_10
> Backups Lifecycle
_10
Exit

  1. Enable lifecycle options and configure them:

_10
? Select action to perfom: Backups Lifecycle
_10
? Enable backups lifecycle? Yes
_10
? Select : [Use arrows to move, type to filter]
_10
> Configure Log Retention
_10
Configure Daily Retention
_10
Configure Weekly Retention
_10
Configure Monthly Retention
_10
Configure Yearly Retention
_10
Deactivate Lifecycle
_10
Return

  1. Specify the proper information for each specific retention period:

    • For log retention, specify the retention days after which the logs will be purged:

      _10
      ? Select : Configure Log Retention
      _10
      ? Set the number of retention days: (0) 15

    • For daily retention, specify the retention days after which the backups will be purged:

      _10
      ? Select : Configure Daily Retention
      _10
      ? Set the number of retention days: (0) 15

    • For weekly retention, specify the retention days and the day of the week (DOW) for the backup to be performed:

      _11
      ? Select : Configure Weekly Retention
      _11
      ? Select action to perfom: Edit existing profile
      _11
      ? Set the number of retention days: 90
      _11
      ? Choose the day of the week [Use arrows to move, enter to select, type to filter]
      _11
      > Sunday
      _11
      Monday
      _11
      Tuesday
      _11
      Wednesday
      _11
      Thursday
      _11
      Friday
      _11
      Saturday

    • For Monthly retention, specify the retention days and the day of the month (DoM) for the backup to be performed:

      _10
      ? Select : Configure Monthly Retention
      _10
      ? Set the number of retention days: 120
      _10
      ? Choose monthly retention [Use arrows to move, enter to select, type to filter]
      _10
      Specific Weekday of every Month
      _10
      Day of every Month
      _10
      > First Day of every Month
      _10
      Last Day of every Month
      _10
      Back

    • For Yearly retention, specify the retention days and the day of the year (DoY) for the backup to be performed:

      _10
      ? Select : Configure Yearly Retention
      _10
      ? Set the number of retention days: 720
      _10
      ? Yearly Menu [Use arrows to move, enter to select, type to filter]
      _10
      > First day of the Year
      _10
      Last day of the Month
      _10
      Day of specific month
      _10
      Specific day of Year
      _10
      Back

Use cron expressions

For the weekly, monthly and yearly retention periods you can use cron expressions to identify when the retentions should be applied. Use one of this examples if needed, to modify the configuration file manually:

cron expresiondescription
0 0 * * <n>Weekly. Set one day of week where <n> [0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday]
0 0 1 * *First Day Of Month
0 0 L * *Last Day Of Month
0 0 <n> * *Specific Day Of Month (n = day of month)
0 0 * * <wd>#1First Week Of Month, where <wd> [0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday]
0 0 * * <wd>#2Second Week Of Month, where <wd> [0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday]
0 0 * * <wd>#3Third Week Of Month, where <wd> [0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday]
0 0 * * <wd>#4Fourth Week Of Month, where <wd> [0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday]
0 0 * * <wd>#LLast Week Of Month, where <wd> [0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday]
* * 1 1 *First day of the Year
* * L 12 *Last day of the Month
* * <d> <m> *Specific day of Year, where <d>: day, and <m>: month

Auto Delete Expired Backups

You can make CxLink Backup to delete the expired backups each time a backup is executed. This operation will delete the file from both the catalog and the cloud storage destination.

To activate this option, follow these steps:

  1. Start emory settings tool by executing /opt/emory/emory as <sid>adm
  2. Select Backups Lifecycle settings from the main menu.

_17
? CxLink Backup: [Use arrows to move, enter to select, type to filter]
_17
--------------------------------------------------------------------------------
_17
Storage Providers profiles
_17
Set storage providers for backup/restore, disaster recovery and system copy
_17
Configuration for DB2
_17
> Backups Lifecycle settings
_17
Monitoring
_17
--------------------------------------------------------------------------------
_17
License
_17
--------------------------------------------------------------------------------
_17
Logging file settings
_17
Debug traces
_17
Show relevant information of this CxLink Backup
_17
--------------------------------------------------------------------------------
_17
Catalog & Backups management
_17
--------------------------------------------------------------------------------
_17
Exit

  1. Select Delete expired backups automatically:

_10
? CxLink Backup: Backups Lifecycle settings
_10
? Select : [Use arrows to move, enter to select, type to filter]
_10
Configure Log Retention
_10
Configure Daily Retention
_10
Configure Weekly Retention
_10
Configure Monthly Retention
_10
Configure Yearly Retention
_10
Deactivate Lifecycle
_10
> Delete expired backups automatically
_10
Back

  1. Answer Yes [Y] when prompted:

_10
? CxLink Backup: Backups Lifecycle settings
_10
? Select : Delete expired backups automatically
_10
? Delete automatically expired backups? (Y/n) Y

  1. You can go now back and save the new configuration.

You can see the parameter in you configuration file with the following syntax:


_10
LifeCycle:
_10
Enabled: true
_10
AutoDeleteExpired: true

Lifecycle and storage provider versioning and replication

If you have versioning and/or data replication activated there are some actions to be performed to have cxLink Backup lifecycle working properly.

AWS S3 bucket replication

AWS bucket replication requires versioning to be enabled.

Replication is supported by cxLink Backup. However versioning generates a noncurrent version of every deleted object, and by default those objects are never removed.

If cxLink Backup lifecycle has been activated to free up storage space from AWS S3, some configurations have to be done:

  • Create an S3 lifecycle rule to remove all noncurrent versions of an object older than 1 day in both buckets, original and replica

Note: you can also check Delete expired object delete markers or incomplete multipart uploads (optional)

  • Configure a replication rule to replicate S3 Delete Markers from original bucket to its replica to avoid objects being recovered from replication bucket when cxLink Backup removes them from the original one