Back Up a Configuration Database


Scenario/Problem: You want to back up a configuration database within your SQL Server.


Solution: Use the Backup-SPConfigurationDatabase cmdlet with the Directory parameter.

The Backup-SPConfigurationDatabase cmdlet enables you to perform a backup on a configuration database, placing the backup files in the directory specified. Listing 7.10 shows an example.

Listing 7.10. Sample Script for Backing Up a Configuration Database


Backup-SPConfigurationDatabase -Directory F:Backups


This cmdlet already knows which configuration database the current server and SharePoint farm are using. Use the -DatabaseServer and -DatabaseName parameters to specify the actual configuration database name and location.

If you are backing up the current configuration database the farm is using, you also can use the Backup-SPFarm cmdlet with the ConfigurationOnly switch parameter, as shown in Listing 7.11.

Listing 7.11. Using Backup-SPFarm to Back Up the Configuration Database


Backup-SPFarm -BackupMethod Full -Directory F:Backups
-ConfigurationOnly



Tip

For backup and restore operations of the current farm, using the Backup-SPFarm cmdlet with the ConfigurationOnly switch parameter is recommended to back up the configuration database.


The BackupMethod parameter can be either Full or Differential. Full backs up the entire configuration, whereas Differential backs up only changes that have occurred since the last full backup was performed.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.193.172