How to Recover deleted SharePoint lists, list items, libraries and even deleted Site Collections?
If you accidentally deleted something (list or list items) from SharePoint. Don’t worry, it is still possible to recover them!
SharePoint content recovery process is much like restoring something from the recycle bin on your PC. data removed from SharePoint site directly goes to SharePoint recycle bin from where it can be recovered or can be deleted permanently.
SharePoint Recycle Bin
SharePoint recycle bin is a powerful and very important tool that can be used to recover content that has unintentionally been deleted.
The SharePoint recycle bin is divided into two stages:
First-Stage Recycle bin: If the file or even entire list / lib is removed, it is moved to the Recycle Bin for the site, user or a site collection administrator can restore it. A direct and quick way to access site’s recycle bin is by adding “/_layouts/15/Recyclebin.aspx” at the end of your site’s root URL.
Example: SharePoint Site URL is https://share.domain.com then site recycle bin can be accessed by using https://share.domain.com/_layouts/15/Recyclebin.aspx
Site Admins can also use this “_layouts/15/AdminRecycleBin.aspx” at the end of site’s main URL.
Files deleted from the first stage Recycle Bin doesn’t permanently delete them. Instead, moved to another Recycle Bin (second stage) that can be accessed by the site collection administrator.
Second-Stage Recycle bin: If the file/list/library is deleted from the site Recycle Bin then it is sent to the Site Collection or Second-Stage Recycle Bin, where only a site collections administrator can restore it or remove it permanently. second stage recycle bin can be accessed by adding “_layouts/15/AdminRecycleBin.aspx?View=2” at the end of your site root URL.
Example: site URL is https://share.domain.com then site recycle bin can be accessed by using https://share.domain.com/_layouts/15/AdminRecycleBin.aspx?View=2
Note: Deleted file/list/lib stays in the site’s recycle bin for 30 days. This is the default retention time.
Recover SharePoint deleted Site Collections Using PowerShell
When a SharePoint site is deleted, it is not gone forever. The site collections just moves to a holding place in your SharePoint content database.
In order to recover / restore accidentally deleted site use the following commands.
Open SharePoint Management Shell – In case of Windows PowerShell, add / load SharePoint module by issuing the following statement:
Add-PSsnapin Microsoft.SharePoint.PowerShell
Run “Get-SPDeletedSite” it will list down deleted site collections. Select the site needs to be restored. Copy SiteId and issue the following command to restore entire site collections.
Following command can be used to restore SharePoint Site Collections.
Restore-SPDeletedSite -Identity <Site-Collection-ID>
NOTE: If site collection is removed using “Remove-SPSite” it doesn’t appear in Get-SPDeletedSite.
So beware ! if developing any automated solution or scripted administration tool, never use remove-spsite alone – always pass “-gradualdelete” parameter and that way site collection will appear in get-deletedsite command.
e.g. Remove-SPSite -Identity “https://<site-collection-url>” -GradualDelete
Author : Jameel
…
For product & sales related queries, please email us at sales@machsol.com