How to recover a deleted file from sharepoint​?

Recovering a deleted file from SharePoint can be crucial, especially when important documents are accidentally removed or lost. SharePoint offers several built-in tools and methods for retrieving deleted files, making the process more straightforward. 

SharePoint’s File Recovery System

Before diving into the recovery process, it’s essential to understand how SharePoint manages deleted files. SharePoint provides two primary stages for file deletion:

The Recycle Bin:

When a file is deleted from a SharePoint document library, it is initially moved to the Recycle Bin. Files in the Recycle Bin are recoverable for a limited time, typically 93 days, before they are permanently deleted.

The Second-Stage Recycle Bin:

If the file is removed from the Recycle Bin (either manually or automatically), it moves to the Second-Stage Recycle Bin, also known as the Site Collection Recycle Bin. This stage provides another opportunity to restore the deleted file before it’s permanently erased from the system.

Steps to Recover a Deleted File from the SharePoint Recycle Bin

1. Access the Recycle Bin

Go to the SharePoint site where the file was originally stored.

Navigate to the document library that held the deleted file.

In the left-hand navigation pane or the site settings, you will find the Recycle Bin option. Click on it to access the list of deleted items.

2. Locate the Deleted File

In the Recycle Bin, you’ll see all recently deleted files, including documents, folders, and even list items. You can search or sort by deletion date to find the file you wish to recover.

3. Restore the File

Once you’ve located the file, select it by checking the box next to its name.

Click the Restore button, and the file will be moved back to its original location in the document library.

Recovering Files from the Second-Stage Recycle Bin

If the file isn’t in the primary Recycle Bin, it might have been moved to the Second-Stage Recycle Bin. To recover files from this stage:

1. Access the Second-Stage Recycle Bin

From the Recycle Bin page, look for the Second-Stage Recycle Bin link at the bottom of the page.

Click on this link to access the secondary bin for deleted files.

2. Locate and Restore the File

In the Second-Stage Recycle Bin, you will see files that have been removed from the first stage.

Search for the deleted file, select it, and click Restore.

Using PowerShell to Recover Deleted Files

For more advanced users or administrators, PowerShell can be used to recover deleted files, especially in cases where a file may not be showing up in the Recycle Bin. PowerShell can retrieve files from both stages of the Recycle Bin, provided they haven’t been permanently deleted.

1. Open PowerShell

Open SharePoint Online Management Shell or Windows PowerShell with the appropriate modules installed.

2. Run the Recovery Command

Use the following command to find and recover deleted items:

powershell

Restore-SPODeletedSite -Identity

You can modify the command to restore individual files or document libraries by specifying their path.

File Recovery from SharePoint Online Versions

Another method of recovering files in SharePoint is using the version history feature. SharePoint maintains version histories of documents, allowing users to restore a previous version of a file if it was modified or deleted.

1. Navigate to the File

Go to the document library and find the file you wish to recover.

2. View Version History

Right-click on the file and select Version History from the context menu.

3. Restore a Previous Version

A list of previous versions will appear. Choose the version you wish to restore and click Restore.

This process can help you recover an earlier version of the document if the file itself was deleted but an earlier version still exists in SharePoint’s history.

SharePoint Admin Center File Recovery

For administrators, SharePoint provides additional options for restoring files, especially if they are not available in the Recycle Bin or Version History.

1. Access the Admin Center

Go to the Microsoft 365 Admin Center and navigate to SharePoint Admin Center.

2. Search for Deleted Files

Admins can use the Content Search feature to locate files that may have been permanently deleted.

This method is useful when files are no longer found in the Recycle Bin or version history.

3. Restore the File from the Admin Center

Once the file is found, you can restore it from the Admin Center by following the on-screen prompts.

Tips for Preventing Data Loss in SharePoint

While recovery options in SharePoint are robust, prevention is always better than cure. Here are some tips to help safeguard your files:

1. Implement Retention Policies

SharePoint allows administrators to set retention policies, ensuring that files are not accidentally deleted before a specified period.

This can provide an extra layer of protection, especially for critical documents.

2. Set Up Alerts

Set up alerts to notify you when important files are deleted or modified.

This helps you catch accidental deletions early and take action promptly.

3. Educate Users

Educate SharePoint users on the importance of file retention and the proper procedures for deleting documents.

This can prevent accidental deletion and reduce the frequency of data recovery requests.

Troubleshooting File Recovery Issues

In some cases, you may run into issues while trying to recover a deleted file. Here are some common problems and solutions:

1. File Not Appearing in the Recycle Bin

If a file doesn’t appear in the Recycle Bin, it may have been deleted using other means, such as through a third-party tool or by an administrator.

In this case, check the Second-Stage Recycle Bin or use PowerShell for recovery.

2. File Is Not in Version History

If a file is not listed in the Version History, it may have been deleted or overwritten. However, SharePoint admins can use the Admin Center or PowerShell to check for any available backups.

3. File Is Permanently Deleted

If a file is permanently deleted (e.g., from both Recycle Bins), recovery may be impossible unless the file was backed up through a third-party backup tool or an Office 365 backup service.

About us and this blog

Panda Assistant is built on the latest data recovery algorithms, ensuring that no file is too damaged, too lost, or too corrupted to be recovered.

Request a free quote

We believe that data recovery shouldn’t be a daunting task. That’s why we’ve designed Panda Assistant to be as easy to use as it is powerful. With a few clicks, you can initiate a scan, preview recoverable files, and restore your data all within a matter of minutes.

Subscribe to our newsletter!

More from our blog

See all posts