Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:


$site= new-Object Microsoft.SharePoint.SPSite($url)
foreach ($name in $names)
    $n2 = ""
    if ($name.Length -eq 0) 
    	{ $n2="ROOT" }
    	{ $n2 = $name }
    $tmp=$n2.Replace("/", "_") + ".sbk"
    $saveas = ""
    if ($backupFolder.Length -eq 0) 
    	{ $saveas = $tmp }
    	{ $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 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?

share|improve this question
Any particular reason your not using stsadmin to do this? – BinaryMisfit Sep 17 '09 at 19:34
Maintenence--the powershell enumerates the site collections for me and grabs everything. Elsewise someone has to remember to go update the backup script when they add a site. I'd also bet that internally, STS admin is making a call to SPSite.WebApplication.Backup so it really is a matter of how to get there. – Wyatt Barnett Sep 17 '09 at 19:49
up vote -1 down vote accepted

im a bit fuzzy on this, as its been a while and i dont have the server in question in front of me, but i think i had a similar problem.

we had a sharepoint services site that absolutely would not back up at all no matter what i did - until i created a share with write access for the guest user (i think).

this is really a terrible answer, and ill update it later with more detail.

UPDATE: mine is also implemented using stsadmin, per a commenter above. i did not enumerate any specific sites or hosts other than the machine that is hosting sharepoint itself.

share|improve this answer
Any updates--still can't seem to get this going. – Wyatt Barnett Oct 7 '09 at 23:05
This is not a good answer. I hope you edit your answer to be more accurate and concise. – jftuga Mar 28 '11 at 19:51
i tried to delete it, but its the accepted answer so i can only vote to have it deleted. – Devnull Mar 28 '11 at 19:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.