Deleting old backups with SAS Backup Manager

2

As Gerry Nelson pointed out in an earlier post on 9.4M3, a new interface to the SAS Backup and Recovery Tool is available from the Administration application in SAS Environment Manager.  This new SAS Backup Manager interface makes scheduling regular backups and executing ad hoc backups extremely easy to do and greatly simplifies the life of a SAS administrator.  The ease with which new backups can be made should also encourage closer adherence to best practices suggesting backups before and after significant system modifications.

The SAS Backup Manager interface includes a History view of the backups that have been run and displays details of a selected backup.  In this case, I selected the oldest backup in my history which is one I took after my initial 9.4M3 install in July.

Backups

So what happens when you want to delete an old backup?  It turns out that there really isn’t a safe way to selectively remove an individual backup.  Instead, configuration of the backup policy enables an administrator to specify a retention period for backups and as part of running a new backup, any previous backups older than the retention period are purged from the system.

The default retention period is 30 days which, when coupled with the default scheduled weekly backup, maintains at least four historical backups. This ratio seems fair and reasonable for most sites in terms of disk management and flexibility for recoveries. For my system, I have scheduled daily backups so I reduced the retention period to 15 days which provides me with roughly a rolling two-week window of backups and fits within the disk budget I have for my archived backups. If you change the frequency of the scheduled backups you should also consider modifying the retention period to help balance the space the archived backups will require with the required range of dates for recovery. Scheduling daily backups and leaving the retention period at 30 will provide a recovery window of 30 days but will require space to store 30 sets of backups. Similarly, scheduling daily backups and shrinking the retention period reduces the window of time from which a recovery is possible but also reduces the disk space required to store the archived backups.

Backups2

What confused me for a bit was that I never saw any change in the status of my old, purged backups in the backup history display.  Turns out that the help documentation for the SAS Backup Manager clearly states that the history view “… includes all backups or recoveries that are recorded in backup history, including backups that have been purged due to the retention policy.”

Aside from examining the Vault location on disk, the best way to determine the current state of a specific backup is to run the sas-display-backup command from the <SASHome>/SASPlatformObjectFramework/9.4/tools/admin directory, passing in the backupid of the entry of interest.

Backups3

As you can see from the example above, the post-install backup I ran back in July was purged once its date exceeded the 15 day retention period I specified.

A few of things to keep in mind about purging backups:

  • Configure your backup retention policy carefully, keeping in mind that it will determine how long each backup will be available to use as a recovery point and also the amount of disk space required to store your archived backups.
  • Any, and all, backups older than your backup retention policy value will be purged.  As far as I know, there is no way to tag a backup to prevent it from being purged.
  • The History view does not indicate the current state of a particular backup – only the execution status of the backup operation when it ran for that particular instance.
  • The sas-display-backup command reports the current state of an earlier backup.  If purged is true, it’s gone!
Share

About Author

Scott McCauley

Senior Manager

Scott McCauley is a Senior Manager in the Global Enablement and Learning (GEL) Team within SAS R&D's Global Technical Enablement Division. Scott has spent most of his professional career in SAS consulting, most recently on a team that prepares SAS Technologists for implementations of SAS Visual Analytics and the SAS Analytics Platform. His primary focus is on administration of SAS environments, including security, monitoring, and system automation.

2 Comments

  1. Great article Scott!!

    I'm in a site with a Win 2012R2 OS, 94_M3 and most things are just sweet. Interestingly, the 30 day default is set but the purge is not occurring. I will get in contact with TS but it's got me scratching my head at the moment. I thought I saw that this was a known issue last week while I was googling some other issue but now I can't find it.

    Cheers.

    • Scott McCauley
      Scott McCauley on

      Thanks, David. In my experience, one of the confusing aspects to the purge is that the SAS Environment Manager interface continues to list backup occurrences even after the related archive has been purged. I'm not sure if this matches what you are seeing or not but I'm sure TS will be able to help get the details ironed out.

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to Top