Permissions Required for Sharepoint Backups

Posted by Wyatt Barnett on Server Fault See other posts from Server Fault or by Wyatt Barnett
Published on 2009-09-17T19:28:09Z Indexed on 2010/05/07 2:08 UTC
Read the original article Hit count: 322

Filed under:
|
|

We are in the process of rolling out an extranet for some of our partners using WSS 3.0 as the platform. We already use it internally for a variety of things, and we are using the following powershell script to backup the server:

param(
    $url="http://localhost",
    $backupFolder="c:\"
)
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")

$site= new-Object Microsoft.SharePoint.SPSite($url)
$names=$site.WebApplication.Sites.Names
foreach ($name in $names)
{
    $n2 = ""
    if ($name.Length -eq 0) 
    	{ $n2="ROOT" }
    else
    	{ $n2 = $name }
    $tmp=$n2.Replace("/", "_") + ".sbk"
    $saveas = ""
    if ($backupFolder.Length -eq 0) 
    	{ $saveas = $tmp }
    else
    	{ $saveas = join-path -path $backupFolder -childPath $tmp }
        $site.WebApplication.Sites.Backup($name, $saveas, "true")
        write-host "$n2 backed up to $saveas."
}

This script works perfectly on the current installation running as our domain backup user.

On the new box, it fails when ran as the backup user--claiming "The web application located at http://extranet/" could not be found. That url does, in fact, work so I'm fairly certain it isn't anything that dumb and rather is some permissions issue. Especially because, when executed from my security context, the script works perfectly.

I have tried making the backup user a farm owner, as well as added him to the various site collection admin groups on the extranet. The one major difference between the extranet and the intranet server is that the extranet has an alternative access mapping (for https://xnet.example.com) and also uses forms authentication for that mapping. Anyhow, what permissions (or other voodoo) do I need to setup to get this script to work properly?

© Server Fault or respective owner

Related posts about sharepoint

Related posts about wss-3.0