Skip to main content
< All Articles

How the SharePoint Online Recycle Bin Restore process works

While I have blogged extensively in the past about the Recycle Bin and its nuances, I have never explained in detail how the restore process works. If you think restoring files and folders is simple, think again. In this post, I want to explain the different scenarios possible with the Recycle Bin Restore process and the consequences that might arise.

Scenario 1: Restore a deleted file

The first scenario is quite simple and probably the most common.

  1. You deleted the file or folder
  2. You then try to restore a deleted file or folderClient Docs library with a file selected and its menu open showing Delete highlighted
  3. Suppose you deleted a file located inside the document library or some folder and soon realized you need it back. In that case, you can just click the restore button next to the file, and it will go back to the same location it was deleted from (same library, same folder).Recycle Bin Restore process

Scenario 2: Restore the deleted folder with files and folders inside

The second scenario is quite common, too.

  1. Instead of a file, you deleted a folder with contents inside (other files and folders)
  2. You then try to restore the deleted folder and its contentsClient Files folder in a document library listing an Invoices folder and Test Doc files
  3. The deleted folder + its contents will go intact to the Recycle Bin. If you decide to restore that folder later, just click the restore button next to the folder, and it will go back to the same exact spot (same document library, same top-level folder/folder path).SharePoint Recycle bin with the Client Files folder selected and Restore highlighted
  4. So far, so good.

Scenario 3: Restore a deleted file or folder when the parent folder was also deleted

This is where it gets tricky.

  1. Say you deleted a file or folder with contents inside (other files and folders)Recycle Bin Restore process
  2. You then delete the original parent folder where the deleted file or folder from above initially resided.Delete confirmation dialog for the Client Files folder in the Client Docs library
  3. In this case, when you restore a deleted file or folder, the original folder path will be recreated! So you will end up with all these parent folders and subfolders just to house the restored file or folder!Recycle bin with several deleted files and folders selected and Restore highlightedRecycle Bin Restore process

Scenario 4: Restore a deleted file or folder when the parent folder was also deleted, but then restored

The following scenario is somewhat of a derivative of Scenario 3. Here is a use case.

  1. Say you deleted a file or folder with contents inside (other files and folders)Delete confirmation dialog for selected items inside the Client Files folder
  2. You then delete the original parent folder where the deleted file or folder from above initially resided.
    Delete confirmation dialog for the Client Files folder in the Client Docs library
  3. Just as in Scenario 3, when you restore a deleted file or folder, the original folder path will be recreated! So you will end up with all these parent folders and subfolders just to house the restored file or folder!Recycle Bin Restore processClient Files folder with a callout noting the top-level folder was manually recreated during restore
  4. You then decide to restore the deleted parent folder. Board Site Recycle bin with the Client Files folder selected and Restore highlighted
  5. Here is what will happen in this particular scenario. As mentioned in the previous scenario, when you restore the deleted file or folder (Step 3 above), the original parent folder path will also be restored. However, when you restore the deleted parent folder (Step 4 above), there will be a bit of a conflict. The parent folder path has already been recreated (restored).
  6. So what will happen is that you will end up with 2 folders with the same name, but one of them will have (1) next to it.Recycle Bin Restore process
  7. But here is something really important: 📢🔔📢 The folder getting (1) designation will be the folder you restored in Step 3! In other words, the folder getting (1) will be the folder that was restored for the purposes of the path, not the restored parent folder. Let me rephrase it. If you restore the deleted parent folder in Step 4, the other folder will be renamed and get (1) designation next to it! Hopefully, that makes sense.
  8. So you would need to ensure everyone on your team understands this – otherwise, they will think the files are missing! So yeah, you might need to manually merge the folders to clean it up!

Scenario 5: Restore deleted files or folders when the Document Library was also deleted

The final scenario is probably less common, but still might occur if you have some advanced team members.

  1. You delete some files or folders from a document libraryClient Docs library with the Photos folder selected and the Delete button highlighted
  2. You then delete the entire document library where the original files and folders residedRecycle Bin Restore process
  3. You then decide to restore the deleted files or foldersBoard Site Recycle bin with Client Docs and the Photos folder, Photos selected for restore
  4. You will then get this weird error: “Item cannot be modified because the site is on hold or retention policy.”Recycle Bin Restore process
  5. There is no hold or retention policy in this case. It is essentially saying that you first need to restore the document library where deleted files and folders reside. Yeah, I know, the error message could be a bit more user-friendly.
  6. To address this issue, you would first need to restore the document libraryBoard Site Recycle bin with the Client Docs library selected and Restore highlighted
  7. Once that is completed, you can restore deleted files and folders from that library.
Gregory Zelfond, the SharePoint Maven - profile photo

About Me

I’m Greg Zelfond, a U.S. based SharePoint consultant, and I provide affordable out-of-the-box SharePoint consulting, training, and configuration assistance to small and medium-sized businesses all over the world.

Need help?