Have you ever accidentally deleted an important document from SharePoint? Or maybe a colleague deleted something they shouldn’t have? Then there is no need to panic because we can recover the files from the SharePoint Recycle Bin.
The often overlooked SharePoint Recycle Bin is a powerful tool that can save you from a potential disaster. It will keep your deleted files for up to 93 days, in its two-staged recycle bin. This way you can easily recover any deleted files from SharePoint.
In this article
In this article, we’ll take a deep dive into the SharePoint Recycle Bin and show you how to use it effectively to recover your deleted content.
What you need to know
Before we are going to take a look at where to find the recycle bin and how to restore deleted files, there are some things you need to know. Microsoft offers a couple of tools to protect your data in SharePoint Online:
- First-stage recycle bin
- Second-stage recycle bin
- Retention policies
- Backup from Microsoft
The last two are out-of-scope for this article. Retention policies have to be configured by your IT Admin, to be able to restore data from it. And the backup from Microsoft is really a last resort, you will need to create a support case, it can take a couple of days for the data to be restored and Microsoft only restores complete SharePoint sites, not individual files or folders.
Versioning is often the first location where you look when you want to restore a file. New versions are automatically created when modifying or re-uploading files in SharePoint. By default, 500 versions are kept of a file.
And of course, we have the recycle bins in SharePoint. Files and folders that are deleted from SharePoint will be retained for 93 days. They will stay primarily in the first-stage recycle bin during the retention period. Only when the first stage recycle bin is emptied, or files are manually deleted from the first stage recycle bin, then they will stay in the second stage recycle bin for the remainder of the 93 days.
To view or restore files from the recycle bin in SharePoint you will need to have edit permissions. If you only have read permissions then you won’t see any files in the recycle bin.
SharePoint Recycle Bin Location
There are two locations where you can find the SharePoint recycle bin. For most SharePoint sites, which are modern sites these days, you can find the recycle bin in the menu of the SharePoint site:
For other SharePoint sites, like communication sites, you can access the recycle bin using the site contents menu. This method also works for modern sites, in case you don’t see the link in the menu:
- Click on the Gear (settings) icon in the top right corner
- Choose Site Contents
- Click on Recycle Bin
Recover Deleted File in SharePoint
Recovering deleted files from SharePoint can be done from the recycle bin. Import is that you have edit permissions in the SharePoint site and library. Without it, you can’t recover the files. To recover files and folders you will need to open the SharePoint site in your browser. Even if you deleted the file in your synced folder in explorer.
- Open the recycle bin
- Select the files and folder you want to recover
- Click on Restore
Second-stage Recycle Bin
If you don’t see the files that you want to recover, then it’s possible that the files are moved to the second-stage recycle bin. Files are moved to the second stage when they are deleted from the normal (first-stage) recycle bin or when the first stage is emptied completely.
NoteOnly site Owners and SharePoint Admins can open the second-stage recycle bin. Site members, even with edit permissions, can’t access it!
You can open the second-stage recycle bin by opening the normal recycle bin in SharePoint and scrolling all the way down. There you will find a link to the second-stage recycle bin:
The second stage looks and works the same as the normal recycle bin. If you restore a file from the second stage, it restores to the original location.
Recovering Document Libraries and Lists
Besides files and folders, are also lists and document libraries retained in the recycle bin. Restoring a complete document library can be done in the same way as restoring a file. You can recognize the list and libraries on their list icons. Simply select the item to restore and click on Restore:
If you have, for whatever reason, first deleted some files and then the whole document library, then you will need to restore the library first. Otherwise, you will get the error that you must first restore the original list in order to restore the file. This also applies to list items and lists.
So in the example below, we will first need to restore the Budgets library (1), before we can restore the two files from the library (2):
When you need to recover a lot of files and folders in SharePoint, then the recycle bin isn’t your best option. The problem is that you can’t use any filters or search options to recover all files that are deleted yesterday by a specific user, for example. With PowerShell however, we can create queries to select and recover only the files we need.
I already have written an article on how to recover SharePoint files with PowerShell. Make sure that you check it out when you need to recover a lot of files.
The recycle bins retain deleted files for a total of 93 days, in either the first or second-stage recycle bin. After that, you can only ask Microsoft to restore the whole site collection, which isn’t always possible.
Having a third-party backup solution for SharePoint makes restoring a lot easier, and allows you to restore files even beyond the 93 days limit.
I hope you found this article useful, if you have any questions, just drop a comment below.