Gradual site deletion

Recently I had to restore a site collection from production in the acceptance farm of a client. The site collection is a HostNamedSiteCollection. In the acceptance farm the corresponding site collection was not working correctly. So I removed that one through the GUI by going to Central Administration > Application Management > Delete site collection.

By doing so the site collection seems to be deleted. For our setup I had to create a new HNSC and over this HNSC I had to restore the production backup. This resulted in the following error:

Looking up all deleted sites with PS command Get-SPDeletedSite showed that the deleted site collection was deleted. But this means that the site is still in de DB and marked for deletion (the site is marked for Gradual deletion). If Get-SPDeletedSite does not show the just deleted site it really is deleted.


After this step I had to “really” remove the site with PS commandline:

After executing this command the PS command Get-SPDeletedSite does not show the site anymore but one still can not restore over a new site collection created with the same name as the deleted site collection, hence the error.

One has to run the timer job “Gradual Site Delete” (go to Central Administration > Monitoring > Review Job Definitions)


Now theHNSC can be created with this PS command:

And restoring with the following PS command went well now:

There are 2 comments for this article
  1. Dan at 3:20 PM

    I’ve been looking for solution for moving a HNSC site to a new web app on same farm. Restore site was failing. This might be same issue. Did you use backup-spsite?

  2. Marc Molenaar at 12:34 PM

    Hello Dan:
    Sorry for my very late reply.

    Yes I used Backup-SPSite. But be sure to first create a new HNSC before restoring.

Leave a Reply

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