Skip to main content
< All Articles

How the SharePoint Online Recycle Bin Restore process works

Posted on June 20, 2024
SharePoint

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

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 folderHowrecyclebinrestoreprocessworks1
  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 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 contentsHowrecyclebinrestoreprocessworks3
  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).Howrecyclebinrestoreprocessworks4
  4. So far, so good.

Scenario 3: Restore 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.Howrecyclebinrestoreprocessworks6
  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!Howrecyclebinrestoreprocessworks7Recycle Bin Restore process

Scenario 4: Restore 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)Howrecyclebinrestoreprocessworks5
  2. You then delete the original parent folder where the deleted file or folder from above initially resided.
    Howrecyclebinrestoreprocessworks6
  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 processHowrecyclebinrestoreprocessworks8
  4. You then decide to restore the deleted parent folder. Howrecyclebinrestoreprocessworks9
  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 libraryHowrecyclebinrestoreprocessworks11
  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 foldersHowrecyclebinrestoreprocessworks13
  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, error message could be a bit more user-friendly.
  6. To address this issue, you would need first to restore the document libraryHowrecyclebinrestoreprocessworks15
  7. Once that is completed, you can restore deleted files and folders from that library.

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?