In addition to the regular backup guidelines and procedures for Microsoft® SQL Server™, there are additional strategies for backing up the databases involved in snapshot, transactional, or merge replication. These strategies vary according to the role the server performs in replication, that is whether the server is a Publisher, Distributor, or Subscriber, and where in the replication topology, the failure occurs. Always initiate additional backups whenever the replication topology is altered by the addition of new publications, subscriptions, or changes to scheduled jobs.
There are four basic strategies for backing up databases used in snapshot, transactional, or merge replication:
Note As part of any backup strategy, always keep a current script of your replication settings in a safe location. In the event of catastrophic failure of a server or the need to set up a test environment, you can modify the script by changing a few server name references and use it to help recover your replication settings.
In addition to scripting your current replication settings, you should also script the enabling and disabling of replication. These scripts are part of the backup of the Publisher or Distributor.
The simplest strategy for backing up replication is to back up only the Publisher in your replication topology. This strategy requires you to back up the publishing database regularly on the server where the Publisher is located. Before starting the backup process, be sure to synchronize with any immediate-updating Subscribers or Subscribers to merge publications.
The advantages of backing up only the Publisher are that it does not require coordinating the backup with the backup of any other server and it requires the least amount of computing and storage resources. The disadvantage of this strategy is that restoring replication setup in the event of a Publisher or Distributor failure is time consuming.
This strategy involves a coordinated backup of both the Publisher and the Distributor. This strategy requires you to:
The advantages of this strategy are that it accurately preserves the snapshot of the publication as well as the history, error, and replication agent information for your application. It also allows you to recover faster in the event of a Publisher or Distributor failure because there is no need to reestablish replication. The disadvantages of this strategy are that it requires coordination between two backups, and it requires more computing and storage resources than backing up the Publisher only.
Note Using a local Distributor further simplifies the strategy by isolating all required backup maintenance to be scheduled on only one server.
This strategy is similar to backing up the Publisher and places a higher priority on preserving data at the Subscriber. This strategy requires you to regularly back up the publishing database on the server where the Publisher is located. It also requires you to regularly back up the subscribing database on the server where the Subscriber is located. Before starting the backup process, be sure to synchronize with any immediate-updating Subscribers or Subscribers to merge publications.
The advantages of this strategy are that it reduces the amount of time required to recover a Subscriber by avoiding the need to reinitialize the Subscriber with a new snapshot, especially where network connections are slow or processing power is limited. The disadvantage of this strategy is that administering the backups when there are many Subscribers can be quite complex.
Note Use the automatic validation features of replication to ensure the Subscriber has the correct data prior to the backup.
The most complex backup strategy is to back up all the Publishers, Distributors, and Subscribers in your replication topology. This strategy requires you to:
The advantages of this strategy are that it preserves all the complexity and configurations of your replication topology and it provides a greater guarantee that the full state of the application can be recovered regardless of where the failure occurs. The disadvantages of this strategy are that it requires the most computing and storage resources, and it requires the most time to implement recovery.
Monitoring Data Validity |