"Restore the library" means three different things in SharePoint depending on what went wrong, and picking the wrong one wastes the window you have. Work out which situation you are in first.
| What happened | What to use | Time limit |
|---|---|---|
| Lots of files changed, overwritten, or deleted at once. Ransomware, a bad sync, a script that ran twice. | Restore this library | 30 days |
| Specific files, folders or list items were deleted. | Recycle bin, first then second stage | 93 days total |
| One file was overwritten with a bad version. | Version history on that file | As far back as versions are kept |
| The entire library was deleted. | Recycle bin - the library is an item like any other | 93 days total |
Restore this library: the 30-day undo
This is the one most people mean and the one most people cannot find. It rolls the whole library back to a point in time, undoing file and folder activity rather than recovering individual deleted items.
- Open the document library.
- Select Settings, then Restore this library.
- Use the daily activity chart to find the damage. It shows the volume of file activity for each of the last 30 days, which is usually enough to spot the day a sync went wrong or a script ran twice.
- Select the earliest activity you want to undo. Everything after that point is selected automatically, so you are choosing a point in time rather than picking individual actions.
- Confirm the restore.
30 days and 93 days are not the same window
This is the trap. Restore this library covers 30 days of activity. The recycle bin keeps deleted items for 93 days. They are separate features with separate limits, and the difference decides whether your content is recoverable.
If a mass deletion happened 40 days ago, Restore this library will not reach it, but the deleted items are still sitting in the recycle bin with about seven weeks left on the clock. People who only know about the 30-day rollback assume the content is gone. It usually is not.
The 93 days is a total counted from the moment of deletion, and it keeps running while the item sits in the second-stage bin. Emptying the first-stage bin does not reset or extend it.
When the library itself was deleted
Restore this library cannot help, because there is no library left to roll back. A deleted library behaves like any other deleted item: it goes to the site recycle bin, and restoring it brings back the library and its contents together.
If somebody has already emptied the first-stage bin, it is not gone. It has moved to the second-stage bin, which only a site collection administrator can open. This is the single most common reason a user reports a library as permanently lost when it is still perfectly recoverable one level up.
When you are restoring across many sites
Restore this library works on one library at a time, through the browser. That is fine for an incident on one site. It is painful when you are working through a tenant after an offboarding, a bad sync, or a script that touched several sites at once, because you have no way to search the bins or to see which sites are affected.
That is the job Recycle Master does: it reads the recycle bin for a site collection, first stage and second stage, and lets you filter by name, original location, item type, who deleted it, and a date range, then restore the matches together with a choice of what happens when a file already exists. Restoring needs a Recycle Master licence; on the free trial you can search the bin and see exactly what is recoverable without being able to restore it.
Frequently asked questions
How do I restore a SharePoint document library?
How far back can Restore this library go?
Why can I not see Restore this library?
Can I restore a document library that was deleted entirely?
Does restoring a library use up storage?
Related reading
- Searching the SharePoint recycle bin - filtering both stages when scrolling is not an option.
- Bulk restoring items step by step.
- Recovering deleted SharePoint files.
- Restoring a previous version of a file - the single-file case.
- Recycle bin versus Microsoft 365 Backup - what neither of them covers.