SharePoint: Restore a Deleted Site Collection without a Recent Backup

Problem Definition

Restore Deleted Site Collection without any backup/Restore mistakenly deleted Site Collection

Steps to recreate the issue

You have mistakenly deleted any site collection without any recent backup of the site collection

Resolution

1. Open Powershell and run Get-SPdeletedsite. You will see your site collection here with Site ID

  1. Now restore the site collection using this site ID “Restore-SPDeletedSite –Identity “f5f7639d-536f-4f76-8f94-57834d177a99

  1. Now you should be able to see the deleted site collection back in Central admin

Note: I have been able to restore site collection only in 1st couple of hours before the “Gradual Site Delete” timerjob is executed. Once this timerjob is executed, it is difficult to restore the site collection.

You don’t need a recent backup to perform this restore.

Background information

Timerjob : Gradual Site Delete

"When a site collection is deleted, the site collection entry (pointer) in dbo.SiteMap is removed from the configuration database and from dbo.Sites in the corresponding content database. For all purposes of user access to the site collection Url or its content the site collection no longer exists and is inaccessible, or otherwise, the Url is no longer reserved.

The site collection deletion is then queued into a new table (dbo.SiteDeletion) in the hosting content database where it is marked to be gradually deleted.

At this point in the operation, a new Timer Job Definition [Gradual Site Delete] executes on a daily schedule [configurable], and will continuously attempt to delete all the data for all the site collections in its queue (dbo.SiteDeletion). It will delete the data in small enough batches of a maximum of 1000 rows through multiple transactions to avoid lock escalation, and can be resumed in the event any failure occurs so that it can attempt the delete process again if needed.  Once the site collection is fully deleted the dbo.SiteDeletion entry is removed." [Bill Baer, MS]

Reference

See Also