If lots of your OneDrive files get deleted, corrupted, or infected by malware, you may be able to restore your entire OneDrive to a previous time. Files Restore helps you undo all the actions that occurred on both files and folders within the last 30 days.
To correct issues with individual files one at a time, you can restore deleted files or restore a previous version of a file.
Restore OneDrive to a previous time
Step One: Go to the OneDrive website.
Step Two: At the top of the page, select Settings
Step Three: Go down to OneDrive and select Restore your OneDrive.
If you select a preset date, skip to step 8.
If you select Custom date and time, a daily activity chart and an activity feed appears to help you pick a specific time.
The daily activity chart shows the volume of file activates in each day for the last 30 days. It gives you an overview of what has happened to your OneDrive over the time and can help you identify any unusual activities, such as when your entire OneDrive is infected by malware.
The activity feed shows individual file and folder operations in reverse chronological order. You can scroll down to see previous days, or move the slider below the daily activity chart to quickly move to a specific day.
Use the activity chart and activity feed to find activities that you want to undo.
Tip: Use the activity chart to quickly scroll through the activity feed by day and hide recent activities in the feed. You can also use the expand and collapse arrow next to each day in the activity feed to show or hide activities for that day.
Select the earliest activity that you want to undo. When you select an activity, all other activities that occurred after that are selected automatically.
Note: As you pick a day in the activity chart, you hide more recent activities in the feed, but those more recent activities will still be selected if you select an activity. Before you select the Restore button, scroll to the top of the activity feed to see all the activities you are about to undo.
When you’re ready to restore your OneDrive, select the Restore button to undo all the activities you selected.
Your OneDrive will be restored to the state it was in before the first activity you selected.
Limitations and troubleshooting
Files Restore uses version history and the recycle bin to restore OneDrive, so it's subject to the same restrictions as those features. When version history is turned off, Files Restore won’t be able to restore files to a previous version. For information about versioning settings, see Enable and configure versioning for a list or library.
Deleted files can’t be restored after they’ve been removed from the site collection recycle bin — either by manual delete or by emptying the recycle bin.
If you upload a file or folder again after deleting it, Files Restore will skip the restore operation for that file or folder.
If some files or folders cannot be restored, a log file will be generated at the root folder of your OneDrive to capture the errors. The name of the file begins with “RestoreLog” followed by an ID (for example, RestoreLog-e8b977ee-e059-454d-8117-569b380eed67.log). You can share the log file with our support team to troubleshoot any issues that may occur.
(Original article Restore your OneDrive)