SharePoint 2010 PowerShell Backup-SPFarm Error

SharePoint 2010 has a PowerShell backup feature called “Backup-SPFarm“. This will fail if the user running the command does not have full privileges on the underlying SharePoint SQL database. The standard error is not very helpful: “The local farm is not accessible“.

  • Verify that you’re using PowerShell version 2.0 by starting PowerShell with ” powershell -version 2.0” and checking the running powershell version with “$host.version”.
  • Grant database privileges to your backup user account, either “sysadmin” role on the SQL database engine, or “db_owner” role on *all* SharePoint databases. This account is the one you must use to run the PowerShell command Backup-SPFarm.
  • Verify your SQL permissions using GUI SQL Management Studio or Command-Line “sqlcmd” clients to make sure you can view the various SharePoint SQL databases without permissions or connectivity errors.

Once you’re using PowerShell version 2.0 under an account with database privileges, you should have the fundamental requirements to successfully run the Backup-SPFarm cmdlet.

Advertisements

About notesbytom

Keeping technology notes on WordPress.com to free up my mind to solve new problems rather than figuring out the same ones repeatedly :-).
This entry was posted in System Administration and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s