Because both SQL Safe and TSM play very important but different roles in determining data file retention, some advance planning and configuration is required before you begin using SQL Safe with TSM.
First, determine your data retention requirements. For example, you may want to groom (delete) backup archive sets after 7 days. Your TSM Administrator will need to create a new management class for SQL Safe and configure the desired data retention period in TSM (such as, retain all backup files for one week).
When configuring TSM, note that SQL Safe accepts up to 260 characters for the TSM file path name.
Once TSM has been configured, backups can now be performed automatically using SQL Safe policies or manually using the SQL Safe CLI or XSP. When you perform a backup, you can define how long SQL Safe should retain a backup archive. Backup archives that age beyond the specified time period will not be available to restore through the SQL Safe user interfaces. However, keep in mind that these data files will be available on the TSM Server until TSM grooms the backup archives according to the retention time.
Setting data retention in SQL Safe Backup Policy jobs
When using the Management Console, you can configure the SQL Safe retention period (Remove files older than) option on the Location tab of the Policy wizard. This option specifies how long SQL Safe should keep this backup archive available for restore. The SQL Safe Backup Agent will automatically mark these data files as inactive on the TSM Server, which allows the files to be groomed (deleted) by TSM. This expiration processing is based on the retention values configured for the SQL Safe management class.
Setting data retention through the CLI
When using the SQL Safe CLI, use the -delete backup option to specify when SQL Safe should make a backup archive as inactive. For example:
SQLsafecmd backup northwind TSM -tsmhighlevel BACKUP -tsmmanagementclass SQL Safe -delete 1weeks
You do not need to specify the Low Level filename when grooming files through SQL Safe. The Low Level filename is automatically generated in the following format: <instance name>_<database name>_<backup type>_<timestamp>.safe
After the designated time period, SQL Safe marks the backup archives as "deleted" in the Management Console, signaling they are no longer available to restore. However, these backup archives are simply inactive until they are permanently groomed from the TSM Server. You can manually browse inactive backup archives using the TSM Browse command and then manually restore the backup archive.
Setting Data Retention through the XSP
When using the XSP, use the @delete
parameter. This parameter functions in the same way as the –delete
backup option in the CLI. For more information, see the sample XSP scripts available from the Programs menu.