Creating an Automatic Schedule for Database Log Backups

Applies to: Microsoft SQL Server, MongoDB, Oracle, Oracle RAC, SAP for Oracle, Notes Database traditional log backups

Create an automatic schedule to automatically run a database log backup when specific criteria are met. For example, run a backup when the archive log destination fills up to a specified capacity.

Automatic backups of database log files use the data protection resources more efficiently because they only run backup jobs when there is enough data to back up. A non-automatic schedule runs the backup at the specified date and time, even if there is not enough data to back up.

After the database logs are backed up successfully, the CV agent deletes or truncates the logs to free up space on the database server.

Take the following into consideration when plan your log backup schedule:

  • The number of transactions that the database generates

  • The disk size for the log file destination

The Detect file or log activity every setting ensures that the software does not frequently run the job. The software does not check the database threshold settings during this interval. When this interval expires, the software checks to see whether the database qualifies for a backup, based on the log disk usage.

The Force a backup every setting ensures that the software backs up the logs even when the database threshold settings have not been met. For example, if the setting is set to 24 hours and the software has not run an automatic log backup in that time, the software starts a backup without checking the database options. When the interval expires, the software checks if the database or log files were backed up. The software looks at the finish time and if it happened during the Detect file or log activity every interval.

If you assign this schedule type to a subclient that has no backups prior to the assignment, the first backup runs irrespective of the database threshold settings.

The following best practices apply to all the agents:

  • Set a low Detect file or log activity every interval. For example, set a minimum interval of 15 minutes.

  • Set a Force a backup every interval that is less than the time interval between running two backups.

  • Set the option to perform a back up when the log destination fills up to 50%-80%. The actual value depends on your storage size.

You can also configure a schedule policy for automatic database log backups. For information on how to configure a schedule policy, see Adding an Automatic Database Log Backup Schedule to a Schedule Policy.

Best Practice: For some agents, such as Oracle, the Commvault software creates a default archive log subclient. Do not modify the properties of the default archive log subclient.

Procedure

  1. From the CommCell Browser, expand Client Computers > client > agent > instance.

  2. Right-click the subclient and then click Backup.

    The Backup Options for Subclient dialog box appears.

  3. On the Backup Options tab, select a backup type depending on the type of database. For example, for Oracle, Oracle RAC, and SAP for Oracle select a backup type of Full. For SQL Server, select a backup type of Transaction Log.

  4. On the Backup Options tab, select Schedule, and then click Configure.

    The Schedule Details dialog box appears.

  5. In the Schedule Name box, enter a unique name for the schedule.

  6. Select Automatic.

  7. In the Detect file or log activity every box, enter the interval that the software detects if the database or log files qualify for a backup. When this time expires, the Commvault software checks the criteria and automatically starts a backup if any of the criteria are met.

  8. In the Force a backup every box, enter the interval when the software checks to see if the database or log files have been backed up. If this value is met, the job starts regardless of whether the database criteria are met.

  9. Select the criteria to use to run backup jobs:

  10. Database

    Option

    Oracle

    SQL

    Note

    Don't enable disk caching of archive log backups for Oracle source instances that have Live Sync configured, because Live Sync will be disabled as a result. If disk caching is enabled at the plan level or in a schedule policy, you must use a different plan, which doesn’t have disk caching enabled, for the source Oracle instance. Support for Oracle Live Sync with instances that have disk caching of log backups enabled will be added in a later release.

    To activate the disk caching of logs feature, select the Use disk cache for log backups and commit every check box and enter the interval of time between each log commit operation to the CommServe server. For more information on the feature, refer to Disk Caching for Frequent Log Backups.

    Oracle

    Oracle RAC

    SAP for Oracle

    MongoDB

    Notes

    To run backup jobs when the number of log files on the disk use a specified amount of the storage space, select the Start backup when disk at log destination is option.

    To run backup jobs when the number of log files on the disk reach a specified number, select the Number of Archived Logs in Log destination option.

    SQL

    To run backup jobs when the used space of log files reach a specified percentage, select the Start the backup when the log file is option.

    Note: Only databases that use the full recovery model are eligible for automatic log backups.

  11. Click OK to close the Schedule Details dialog box.

  12. Click OK to close the Backup Options for Subclient dialog box.

Loading...