If you accidentally deleted files, overwrote a document, or suffered a ransomware attack in OneDrive for Business, restoring a folder to an earlier date lets you undo the damage. OneDrive keeps version history for up to 500 major versions per file and retains deleted items in the recycle bin for 93 days. This article explains how to use the built-in Restore feature to roll back an entire folder or your whole OneDrive to a specific point in time.
The restore function works by replaying file system changes backward from the current state to a timestamp you choose. It does not affect files that were created after the selected date and remain unchanged. You can restore a single folder only if you use the web interface and select that folder before starting the restore wizard.
You will learn the exact steps to perform a folder-level restore, what happens to files during the process, and how to avoid common mistakes that can cause data loss.
Key Takeaways: Restoring a OneDrive Folder to an Earlier Date
- OneDrive website > Settings > Restore your OneDrive: Opens the file restoration timeline viewer where you can pick a date and time to roll back.
- Restore wizard > Select folder: Limits the restore scope to a single folder instead of the entire OneDrive root.
- Version history (right-click > Version history): Restores a single file to an earlier version without affecting other files in the same folder.
How OneDrive Folder Restore Works
OneDrive for Business keeps a detailed change log of every file creation, modification, deletion, and rename. The Restore feature uses this log to revert the entire contents of a selected folder or your whole OneDrive back to a previous state. When you pick a date and time, OneDrive calculates the exact set of changes needed to return the folder to that point. Files that existed at that time are brought back. Files that were created after that time are removed from the folder but are not permanently deleted. They are moved to the recycle bin, where they remain for 93 days.
The restore operation is non-destructive. It does not overwrite current files with older versions. Instead, it creates a new version of each file that matches the state at the selected date. You can undo a restore by running the wizard again and picking the current date.
Prerequisites for Restoring a OneDrive Folder
Before you start, verify these requirements:
- You must have a Microsoft 365 work or school account with a OneDrive for Business license.
- You need at least read and write permissions on the folder you want to restore.
- The folder must be located in your OneDrive, not in a SharePoint document library or a shared folder owned by another user.
- Restore is available for up to 30 days back from the current date. If you need to go further back, use version history on individual files.
- Your OneDrive must have less than 100,000 files total. The restore wizard will not run if the file count exceeds this limit.
Steps to Restore a OneDrive Folder to an Earlier Date
- Sign in to the OneDrive website
Go to office.com, sign in with your work or school account, and select OneDrive from the app launcher. Do not use the desktop sync app for this task. The restore feature is only available through the web interface. - Navigate to the folder you want to restore
Browse to the folder that contains the files you need to recover. Click the folder name to open it. The restore wizard will use the current folder as the scope. If you want to restore the entire OneDrive, stay at the root level. - Open the Restore wizard
Click the Settings gear icon in the top-right corner, then select Restore your OneDrive from the dropdown menu. A new page opens showing a timeline and a date picker. - Select the folder scope
In the Restore wizard, click the Select folder link below the date picker. A file browser panel appears. Navigate to the folder you opened in step 2 and select it. This limits the restore to only that folder. If you skip this step, the wizard restores your entire OneDrive. - Choose the date and time
Use the calendar or the dropdown arrows to pick the date you want to restore to. OneDrive shows a preview of how many files will be changed. You can also type a specific time in the hour and minute fields. Click the Restore button. - Confirm the restore
A confirmation dialog appears listing the number of files that will be restored, added, or moved to the recycle bin. Review the summary and click Restore to start the process. The operation can take several minutes depending on the number of files. - Check the restore results
After the restore completes, OneDrive shows a success message. Open the restored folder and verify that the files and their versions match the expected state. If something is wrong, run the restore wizard again and pick a different date.
Common Mistakes and What to Avoid
Restoring the wrong folder
If you do not click Select folder in the wizard, OneDrive restores your entire OneDrive root. This can move files you did not intend to change. Always confirm the folder path in the wizard before clicking Restore.
Assuming restore works on shared folders
The Restore feature only works on folders you own in your own OneDrive. If you need to restore a folder in a SharePoint document library, use the SharePoint Restore feature or the Version History on individual files.
Forgetting to check version history first
If you only need to recover a single file, right-click the file in the OneDrive website, select Version history, and restore the specific version. This is faster and does not affect other files in the folder.
Running restore while the sync app is paused
If the OneDrive sync app on your computer is paused, the restored files will not download until you resume sync. After the restore completes, resume sync to bring the changes to your local machine.
Folder Restore vs Version History: Key Differences
| Item | Folder Restore (OneDrive website) | Version History (per file) |
|---|---|---|
| Scope | Whole folder or entire OneDrive | Single file |
| Time range | Up to 30 days | Up to 500 versions (no fixed time limit) |
| Effect on other files | Removes files created after the restore date to recycle bin | No effect on other files |
| Undo | Run restore again with a different date | Restore a previous version again |
| Best for | Accidental mass deletion, ransomware, or folder corruption | Recovering a single overwritten document |
Now you can restore a OneDrive folder to an earlier date using the web-based restore wizard. For single-file recovery, use Version History instead. As an advanced tip, schedule a recurring reminder to check the restore timeline once a week so you catch accidental changes before the 30-day restore window expires.