Restore-SPSite "http://dev.sharepoint2010/websites/0001" -path d:\temp\mybackup.bak -force

I want to restore a SiteCollection. 2 Days ago the same command works fine.

First I want to restore the SiteCollection without deletion. But I get an error in the PowerShell Console. Then I delete the SiteCollection and try it again. (The Database is not full and the maximum number of SiteCollection is not reached) Is there a TimerJob not finished? Possible solutions?

The Error Message:

Restore-SPSite "http://dev.sharepoint2010/websites/0001"
-path d:\temp\mybackup.bak -force  Restore-SPSite : No content databases are available for this operation but the site collection is scheduled for deletion in at least one content database.  Either wait for the deletion operation to complete or  create a content database, and then try the operation again. To create a content database, click "Content databases" on the Application Management page, select the Web application to use, and then click "Add  a content database". At line:1 char:15
+ Restore-SPSite <<<<  "http://dev.sharepoint2010/websites/0001"
-path d:\temp\mybackup.bak -force 
    + CategoryInfo          : InvalidData: (Microsoft.Share...dletRestoreSite:SPCmdletRestoreSite) [Restore-SPSite], InvalidOperationException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletRestoreSite
  • Done all that and am still in the same boat. All I was trying to do was move a host header site collection to a new location. The old site was deleted. The timer job ran. Still the same message and no way to restore it. The -force flag has no effect. This is just stupid IMO. I'm specifying a different -url so why can't SharePoint exercise a little common sense and assign a new GUID?!
    – user7247
    Mar 7, 2012 at 4:25
  • I'm encountering the same problem. Were you able to find a resolution? Thanks!!
    – user4747
    Mar 12, 2012 at 18:38
  • This post helped me a lot in troubleshooting my issue, thanks. I found that all I actually needed to do was restart the SharePoint 2010 Timer service. Once I did that and re-ran the Restore-SPSite command, it worked!!!
    – user13537
    Dec 11, 2012 at 0:47

7 Answers 7


Microsoft uses the source site collection GUIDs during the installation. If you delete the site collection from the web application, it leaves the GUIDs behind, and if you try to restore same site collection (same GUID) into same web application and content database, it would throw an error.

http://support.microsoft.com/kb/926321 - This is applicable to 2007 and 2010 also.

Use the -Force option from Restore-SPSite

  • 1
    Thanks for your comment but I used the -force command. Look at my command
    – user2471
    Apr 7, 2011 at 12:15

I had the same issue - this is how to solve it:

  1. Delete site collection (GUI or PS)
  2. Remove-SPDeletedSite => Delete from Recycle Bin
  3. Check with Get-SPDeletedSite
  4. Run Gradual Site Deletion Timer Job
  5. FINALLY: Restore with PS!

the Error message ("No content databases are available for this operation but the site collection is scheduled for deletion.....".) is expected as the part of new feature in 2010 called as Gradual Site Delete in SharePoint 2010

I think the command will check the deletion queue before restoring :)

Try to see whether the Timer job [Gradual Site Delete] is executed then try the command again with -overrride (stsadm) as I am yet to use Power Shell :(

  • I'm getting the same results as the original poster. My Gradual Site Delete timer job is completing with 'Succeeded' however the Duration is 00:00:00 which is suspicious. I also use the -force option with the Restore-SPSite command.
    – user4747
    Mar 12, 2012 at 18:54

I was also getting the same error. I had deleted the Site Collection through CA. I tried a 'Run Now' on the Gradual Site Delete timer job but still got the same error. (I had understood that it would clean up the GUID but it didn't seem to). The command 'Get-SPDeletedSite' showed me the site hadn't been completely deleted yet. 'Remove-SPDeletedSite' got rid of it. Then I was able to do the restore.

In the end, this is what worked for me as the cleanest/fastest procedure for renaming a Site Collection:

Backup-SPSite –Identity http://sharepoint.abc.com/sites/testsite -Path “c:\site collection backups\testsite.bak”

Remove-SPSite –Identity http://sharepoint.abc.com/sites/testsite

Restore-SPSite –Identity http://sharepoint.abc.com/sites/testsite2 -Path “c:\site collection backups\testsite.bak”


This is old, but I'll toss in what I just went through to get around this problem. In my situation, my web application had 2 content databases. I ran into the same problem as stated; could not restore content databases no matter what, even the "-Force" was useless.

My fix was to set the two content databases so that the current site collection count was also the max site collection account. Then, I created a new content database. After that, I could then do the restore.

While I have no idea why this was necessary, all I know is, "it worked." I suppose I could powershell script a backup of all site collections in the old content dabases, and a restore into the new one, but that's another project...


Encountered the same error as above in my case the cause was an orphaned item in the content-database. I was restoring a root site collection. After a detach and attach of the database I was able to restore the site.

So another option to check when you encounter the error.


I have also faced the same issue even after running the Gradual Site Delete timer job and Remove-SPDeletedSite

It worked only after adding the DatabaseServer and DatabaseName (to an existing DB) parameters. Please ensure the database server name is correct if there are aliases. You can pick it from "cliconfg" from Windows->Run or from by clicking on existing database name in CA.

Restore-SPSite 'site collection url here' -Path C:\Backup\site_name.bak -Force -DatabaseServer "server name here" -DatabaseName "db name here"

I have no idea why adding the db parameters is necessary, but it worked without creating a new database for restoring the spsite.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.