Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » SQL Anywhere Server - Database Administration » Maintaining Your Database » Backup and data recovery » Designing backup procedures


A backup scheme for databases involved in replication

If your database is part of a SQL Remote installation, the Message Agent needs access to old transactions. If it is a consolidated database, it holds the master copy of the entire SQL Remote installation, and thorough backup procedures are essential.

If your database is a primary site in a Replication Server installation, the Replication Agent requires access to old transactions. However, disk space limitations often make it impractical to let the transaction log grow indefinitely.

If your database is participating in a MobiLink setup using dbmlsync, the same considerations apply. However, if your database is a MobiLink consolidated database, you do not need old transaction logs and can use a scheme for databases not involved in replication, as described in the previous section.

In these cases, you can choose backup options to rename and restart the transaction log. This kind of backup prevents open-ended growth of the transaction log, while maintaining information about the old transactions for the Message Agent and the Replication Agent.

This kind of backup is illustrated in the figure below.

For a database involved in replication, the database file and log file are copied to the backup directory. The transaction log is renamed and the database file is left in place. Information about old transactions is still available for the Message Agent and the Replication Agent.

For more information about how to perform a backup of this kind, see Making a backup, renaming the original transaction log.

Offline transaction logs

In addition to backing up the transaction log, the backup operation renames the online transaction log to a file name of the form YYMMDDxx.log. This file is no longer used by the database server, but is available for the Message Agent and the Replication Agent. It is called an offline transaction log. A new online transaction log is started with the same name as the old online transaction log.

The YYMMDDxx.log file names are used for distinguishability only, not for ordering. For example, the renamed log file from the first backup on December 10, 2000, is named 001210AA.log. The first two digits indicate the year, the second two digits indicate the month, the third two digits indicate the day of the month, and the final two characters distinguish among different backups made on the same day.

The Message Agent and the Replication Agent can use the offline copies to provide the old transactions as needed. If you set the delete_old_logs database option to On, then the Message Agent and Replication Agent delete the offline files when they are no longer needed, saving disk space.