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 Cloud and Datacenter Management & Data Platform MVP who has worked in IT for over 20 years. She is the creator of the popular SQL PowerShell module dbatools, and holds a number of certifications, including those relating to SQL Server, Linux, SharePoint and network security. 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 *

*