Resolving Restore-SPSite Errors occurring within Web Apps with Multiple Site Collections

Recently, a colleague requested that I perform a backup of a development site collection at http://sp.ad.local and restore it to the test site collection http://test.ad.local/sites/sp.

The test site collection was one of two site collections on the test.ad.local web app. It’s been a while since I’ve done anything in SharePoint, so I took a look then ran the following.

Admittedly, I was suspicious of the -DatabaseName param I was passing, because that database contained two site collections, and I was only attempting to restore one. Sure enough, the attempted restore gave me the following error:

Restore-SPSite: The site collection could not be restored. If this problem persists, please make sure the content databases are available and have sufficient free space.

Beware: This destroyed the /sites/sp site collection. Attempting to load it gave me a 404 Not Found. Honestly, I was a little blasé about the restore since it was to a test site. So I tried a few things to remedy the issue, and then figured that it would probably work if I isolated the site collection to its own database.

And…done :)

Chrissy is a PowerShell MVP who has worked in IT for nearly 20 years, and currently serves as a Sr. Database Engineer in Belgium. Always an avid scripter, she attended the Monad session at Microsoft’s Professional Developers Conference in Los Angeles back in 2005 and has worked and played with PowerShell ever since. Chrissy is currently pursuing an MS in Systems Engineering at Regis University and helps maintain RealCajunRecipes.com in her spare time. She holds a number of certifications, including those relating to SQL Server, SuSE Linux, SharePoint and network security. She recently became co-lead of the SQL PASS PowerShell Virtual Chapter. You can follow her on Twitter at @cl.

Posted in SharePoint
One comment on “Resolving Restore-SPSite Errors occurring within Web Apps with Multiple Site Collections
  1. Chris says:

    I’m trying to restore to a new content database and still getting this error. It’s actually a generic error thrown by SharePoint. I’ve been struggling with it for 2 weeks and can’t get my life site restored on my local machine. I really hate SharePoint.

Leave a Reply

Your email address will not be published. Required fields are marked *

*