SharePoint 2010 SP1 - Site Recycle Bin
One of the cool new features introduced in SharePoint 2010 SP1 is the Site Recycle Bin feature.
Earlier, the only way to restore deleted sites and site collections required to restore the appropriate content databases. But from SP1 onwards, deleted sites can be recovered from the Site Recycle Bin.
Deleting and Restoring Sites (SPWeb)
When users delete a site, they are presented with the following page:
As you can see from the message, the entire site including its contents, permissions are sent to recycle bin.
When you click Delete, you are prompted with another message box, which may be confusing:
Even though it says the site will be deleted permanently, it is not.
Hit OK and be happy!
If you are a PowerShell user, you can use the Remove-SPWeb cmdlet to delete the web instead of the UI. Just use the –Recycle parameter:
Remove-SPWeb https://site -Recycle
After the site is deleted, it will be available in the top-level site’s recycle bin to restore:
Deleting Site Collections (SPSite)
Unfortunately, if a site collection is deleted, the only way to recover is to use the newRestore-SPDeletedSite cmdlet.
When users delete a site collection, they are presented with the following page:
Below are the steps to restore a deleted site collection using PowerShell:
The deleted site collections are stored in the SPDeletedSite object.
The Get-SPDeletedSite cmdlet lists all the deleted site collections:
Do remember that the Get-SPDeletedSite returns an array if Get-SPDeletedSite is > 1. Use the following command to get the count:
(Get-SPDeletedSite).Count
All we need to do now is bind this with the Restore-SPDeletedSite cmdlet:
Get-SPDeletedSite | where{$_.SiteId -eq "d48e6455-a1ad-43f4-ac11-a5b558b06ead"} | Restore-SPDeletedSite
Use the Remove-SPDeletedSite to permanently remove the deleted site collection. As always, use this with caution.
Recommended Reading
- Restore a deleted site (SharePoint Server 2010) – TechNet Resource
- Restore a deleted site (SharePoint Foundation 2010) – TechNet Resource
- Restore a deleted site collection (SharePoint Server 2010) – TechNet Resource
- Restore a deleted site collection (SharePoint Foundation 2010) – TechNet Resource
Comments
- Anonymous
June 29, 2011
Nice Article . Question is for how long site collections will be available to restore? while they are deleted where do they reside/stored ? I think deleted sites will be availbale as per the recycle bin settings and they are stored in the recycle bin when deleted . - Anonymous
June 29, 2011
@Umar - You are correct. The Recycle Bin settings at the Web Application level still applies to deleting sites and site collections. - Anonymous
July 05, 2011
This is useful: technet.microsoft.com/.../hh272540.aspx - Anonymous
July 12, 2011
Thanks Chaks, great overview! - Anonymous
August 01, 2011
Is it possible to roll back or remove SharePoint 2010 SP1, without performing a full removal of SharePoint 2010? - Anonymous
August 01, 2011
Is it possible to roll back or remove SharePoint 2010 SP1, without performing a full removal of SharePoint 2010 if so how? - Anonymous
August 03, 2011
@mrhassell No, you cannot rollback.