Database Availability Group backup and restore operations
Database Availability Group backup and restore operations
To optimize use of available server resources, Database Availability Group (DAG) members often store a subset of the Exchange Server databases in a combination of active and passive copies.
Typical DAG configuration
Typical data protection deployments in DAG environments
You can back up data from any DAG member and restore the data to any DAG member. You can also back up data from either the active or passive copy. Full and incremental database backups do not have to be completed from the same DAG member. All databases included in a VSS type backup are integrated.
To specify a backup of all DAG nodes, issue the same backup command on each node. The command file contains separate backup commands per database. For example:
tdpexcc backup DB1 full /minimumbackupinterval=60 /preferdagpassive
tdpexcc backup DB2 full /minimumbackupinterval=60 /preferdagpassive
tdpexcc backup DB3 full /minimumbackupinterval=60 /preferdagpassive
In this deployment, one schedule applies to all nodes. The same backup command file is used for each node.
The following figure illustrates another possible backup task distribution across DAG members.
In this deployment, one schedule applies to all nodes. The same backup command file is used for for all nodes. The command file contains separate backup commands per database on that node. For example:
tdpexcc backup DB1 full /minimumbackupinterval=60 /preferdagpassive
tdpexcc backup DB2 full /minimumbackupinterval=60 /preferdagpassive
tdpexcc backup DB3 full /minimumbackupinterval=60 /preferdagpassive
Best practices for backing up a Database Availability Group
When you back up data, distribute the backup workload for scalability and isolate backup activity to a dedicated backup node. When you isolate backup activity, it minimizes the impact to production databases.
As a best practice, identify all replica copies of the same database and eliminate redundant backups of the same databases. You can apply retention policies to databases. Back up databases from any node in the availability group and run restore operations from any node in the availability group.
Complete backups for replicated database copies from the same Exchange Server. Additionally, complete backups on the passive database copies. When you backup passive database copies, you do not increase the load on the production Exchange Server.
When you back up databases, follow these guidelines:
- Use a DAG member to store DAG database backups.
- Ensure that the same VSS policy applies to all DAG members.
- Ensure that the first backup is a FULL backup when you move backups to DAG member backups.
- Ensure that previous backups are manually deleted after you move backups to DAG member backups, assuming that those backups are no longer needed.
- Run backups from a passive database copy to avoid increasing the load on the active databases.
- Schedule all DAG members that have a copy of the database to back up the database at the same time. To set the minimum amount of time before a backup of another DAG copy of the same database is allowed, specify the MINIMUMBACKUPINTERVAL parameter. When you specify this parameter, only one backup is taken per backup cycle.
- If the Exchange Server database belongs to a DAG and is an active database copy, specify the /EXCLUDEAGACTIVE parameter to exclude the databases from the backup.
- If the Exchange Server database belongs to a DAG and is a passive database copy, specify the /EXCLUDEDAGPASSIVE parameter to exclude the databases from the backup.
- If the Exchange Server database does not belong to a DAG, specify the /EXCLUDENONDAGDBS parameter to exclude the databases from the backup.
- To a backup is to be taken from a passive copy unless no valid passive copy is available, specify the /PREFERDAGPASSIVE parameter.
- To bypass an integrity check if two or more valid database copies exist in a DAG, specify the /SKIPINTEGRITYCHECK parameter.
Best practices for restoring a Database Availability Group
In a DAG environment, you must restore databases on an active database copy. To restore to a passive database copy, you must first move the copy to the active state. After the restore operation is complete, you can move the active database copy to the passive state.
If you back up data to a local system, you can complete data restore operations only on the Exchange Server where the backup is taken.