Managed IT for offices across Auckland and Hamilton [email protected]
Free IT health check

Microsoft 365 · 4 min read

Version history and restoring files in OneDrive and SharePoint

Every file in OneDrive and SharePoint keeps earlier versions you can open and restore, deleted files sit in a two-stage recycle bin for a limited time, and whole libraries can be rolled back to an earlier point. Know the time limits, because after they pass the file is gone unless you have a separate backup.

Restoring an earlier version of one file

Version history is the tool for the everyday mistake: someone pasted over a month of figures, saved a template with a client's details in it or accepted the wrong set of tracked changes. In OneDrive or SharePoint in a browser, or from File Explorer through the OneDrive menu, choose Version history on the file. You see each saved version with the date, time and who made it.

Open an older version to check it before restoring. Restoring does not delete the newer versions; it makes the old one the current version and keeps the rest in history, so you can change your mind. If you only need part of an old version, open it, copy what you need and paste it into the current file instead of rolling the whole thing back.

How many versions are kept

SharePoint and OneDrive keep a large number of major versions by default, and administrators can adjust the limits per library or across the organisation. Microsoft has also introduced settings that trim older versions automatically based on age and count, which saves storage but means very old versions may not be there. Check what your libraries are set to rather than assuming every save since the file was created is kept.

Files edited with AutoSave on in the desktop apps create versions frequently as people work, which is useful for recovery but uses storage. Libraries holding large files that change often, such as big spreadsheets or design files, can grow quickly as a result. If storage is tight, adjusting version limits on those specific libraries is better than reducing them everywhere.

The recycle bins

Deleted files go first to the site or OneDrive recycle bin, where the person who deleted them can restore them. If someone empties that, items move to a second-stage recycle bin that only site administrators can see. Together they hold deleted items for a limited period, roughly three months from the original deletion in standard setups, after which they are removed permanently.

Deleting a folder sends the whole folder to the recycle bin as one item, and restoring it brings back the contents in their original place. Restoring works best when done soon. If the deletion was weeks ago and people have since recreated folders with the same names, restore carefully so you do not end up with duplicates or overwrite newer work.

Rolling back a whole OneDrive or library

When the damage is widespread, such as ransomware encrypting a synced folder or a sync mistake that deleted thousands of files, restoring one file at a time is hopeless. OneDrive has a restore feature that rolls the entire OneDrive back to a chosen date and time within a recent window, and SharePoint document libraries offer a similar restore option. The activity chart helps you spot exactly when the mass changes started.

Choose a point just before the problem began and roll back. Changes made after that point are undone, so warn the people who use the library first and note any legitimate work they did in between. If ransomware was involved, clean the infected computer before restoring, otherwise it may simply encrypt the files again as they sync back down.

Where version history runs out

Version history and recycle bins are designed for accidents within a recent window. They do not help if a file was deleted and the bin was cleared months ago, if a former employee's OneDrive was removed after the retention period, if an administrator deleted a whole site, or if an attacker with admin access deliberately purged data. They also live inside the same Microsoft 365 tenant as the original, so a compromise of the tenant affects both.

That is why many businesses add a separate Microsoft 365 backup that copies OneDrive, SharePoint, Teams and mailboxes to independent storage with its own retention. It turns a lost cause into a restore. Whatever you use, test it: pick a file from a few months ago once a quarter and confirm you can actually get it back.

Make recovery easy for staff

Most people do not know version history exists, so they recreate lost work from memory or ask IT to search for a backup that is not needed. A five-minute demonstration at a team meeting, showing how to right-click a file and open its versions, saves hours over a year and reduces the panic when something goes wrong just before a deadline.

Also make sure staff save to OneDrive or SharePoint in the first place. None of these tools help with files saved only to a laptop's local drive or a USB stick. Combined with Known Folder Move, version history means a mistake is usually a two-minute fix rather than a lost afternoon of rework.

In short

  • Version history restores an earlier copy without deleting newer ones.
  • Deleted items sit in two recycle bins for a limited time only.
  • Whole OneDrives and libraries can be rolled back after mass damage.
  • Clean an infected computer before rolling back after ransomware.
  • Add and test a separate backup for anything older or deliberately deleted.

Common questions

Can I recover a file deleted six months ago?

Usually not from the recycle bin, which keeps items for a limited period. You would need a separate Microsoft 365 backup or a retention policy that preserved it.

Does version history work for files on my desktop?

Only if your desktop is synced to OneDrive, for example with Known Folder Move. Files stored only on the laptop's local drive have no cloud version history.

Who can see the second-stage recycle bin?

Site collection administrators for SharePoint, and administrators for OneDrive. Ordinary users only see the first-stage bin.

More on microsoft 365

When IT breaks, work stops.
Let's keep it running.

Start with a free IT health check. We'll show you what is working, what is at risk and what it would cost to fix.

Book a free IT health check