How can I restore a file I saved over?

Accidentally saving over an important file can be extremely frustrating. Thankfully, there are several methods you can try to restore the previous version of the file, depending on what type of file it is and what programs you have available.

Try your operating system’s file history

Most operating systems like Windows, Mac OS, and Linux keep track of previous versions of files and allow you to restore them. Here’s how to access file history in common operating systems:

Windows

Windows has a File History feature that tracks changes to your personal files like documents, photos, videos, and music. To restore a previous version of a file:

  1. Open File Explorer and navigate to the location of the file.
  2. Right-click on the file and select “Properties”.
  3. Click the “Previous Versions” tab.
  4. Click “Restore” to overwrite the current version of the file with the selected previous version.

File History is turned on by default in Windows 10. If you’re on an older version of Windows, make sure File History is enabled under Control Panel > Backup and Restore.

Mac OS

The Mac operating system has a Time Machine feature that creates backups of your files. To restore a previous version of a file using Time Machine:

  1. Open Finder and navigate to the location of the file.
  2. Right-click on the file and select “Enter Time Machine”.
  3. Navigate back in time through the timeline to find a previous version.
  4. Click “Restore” to overwrite the current version of the file.

Time Machine needs to be enabled and configured on your Mac first before this will work. Make sure you have an external hard drive connected.

Linux

Most Linux distributions don’t automatically track file history, but you can enable this functionality by installing a file versioning tool like etckeeper, rsnapshot, or TimeShift. For example, with TimeShift you can:

  1. Open TimeShift.
  2. Find the previous version of the file in the snapshot history.
  3. Click “Restore” to overwrite the current version of the file.

Try recent files in your software programs

Many software programs automatically save revisions as you work on files. You may be able to restore a recently saved version from within the program:

Microsoft Office

If you overwrote an Office file like a Word doc, Excel sheet, or PowerPoint presentation, you can restore previous versions from the recent files list:

  1. Open the Office program like Word or Excel.
  2. Click File > Open.
  3. Click “Recent” on the right.
  4. Click the file revision you want to restore.

You can restore version history from the last 30 days.

Google Docs, Sheets & Slides

Google Drive has built-in version history you can use. To restore a previous Google Doc, Sheet, or Slide:

  1. Open the file in Google Docs/Sheets/Slides.
  2. Click File > Version history > See version history.
  3. Preview the version you want to restore.
  4. Click Restore this version.

You can see revisions from the last 30 days.

Adobe Creative Cloud

Adobe apps like Photoshop, Illustrator, and InDesign auto-save files in the Creative Cloud. You can restore previous versions from within the apps:

  1. Open the Adobe app and the file.
  2. Click File > Versions.
  3. Double click the version you want to restore.

Versions are stored for 30 days in the cloud.

Try file recovery software

If the file you’re trying to restore is not showing up in your operating system’s file history or software program revisions, you may need dedicated file recovery software. These tools scan your storage devices and recover previously saved versions of files.

Popular free file recovery apps include:

  • Recuva (Windows)
  • PhotoRec (Windows, Mac, Linux)
  • TestDisk (Windows, Mac, Linux)

Paid recovery software with more advanced features includes:

  • Stellar Data Recovery
  • EaseUS Data Recovery Wizard
  • Disk Drill

The recovery process typically involves:

  1. Choosing the drive to scan for recoverable files.
  2. Waiting for the scan to complete.
  3. Browsing the files found and previewing their content.
  4. Selecting the files you want to recover.
  5. Choosing a location to save the restored files.

The effectiveness of recovery depends on how long ago the file was replaced and whether new data has overwritten the space on the drive. The sooner you run recovery, the better chance you have.

Check your cloud storage

If you have cloud backup enabled, you may be able to restore previous versions of files from the cloud. Services like Dropbox, Google Drive, OneDrive, and iCloud save file history.

The steps to restore depend on the specific cloud service, but generally involve:

  1. Logging into your cloud account online or via the desktop app.
  2. Locating the file you want to restore.
  3. Viewing prior versions in the file history.
  4. Clicking to download or restore an older copy.

Cloud services typically keep file history for 30 days up to 1 year depending on your account.

Retrieve from your backups

If you have backups saved on an external drive or separate partition, you may find copies of your lost file there. The steps depend on your backup software and location.

For example, with Apple’s Time Machine on Mac OS, you can navigate through your timeline backups in the Time Machine interface to find previous versions of files. With Windows File History, you can access backups through the “Restore personal files” option in the Control Panel.

With regular file copy backups, you will need to manually search through older copies of your file system to find versions of the lost file.

The advantage of backups is that you can go back months or years to find file versions if needed. The downside is that the restore process is often more tedious.

Try file versioning

If you can’t recover a previous version, see if file versioning was enabled for the software program where you made changes. Apps like Microsoft Office and Adobe Creative Cloud have auto-versioning that tracks changes to files while you edit them.

To restore an earlier version, open the program like Word or Photoshop, click File > Open, select the file, and look for a Versions or Revert option. You can browse through different saved iterations and restore an older one.

Versioning needs to be enabled in the program’s settings before the overwrite happens for this feature to work.

Recover from source control

For software developers, if you overwrite code files that are tracked in a source control system like Git, GitHub, Bitbucket, or Visual Studio Team Services, you can roll back changes and sync to a previous commit.

Use your source control client to revert changes and check out an older version of the code to your local machine. Committing regularly to source control gives you an extensive recovery history.

Ask co-workers for copies

Reach out to anyone you collaborated with on the lost file and ask if they have a copy. Emails, network shares, multiple devices, and cloud collaboration tools like Google Docs or Microsoft Teams are worth checking.

Your co-workers may have an older iteration of the file on their computer or in their cloud storage. They can share it with you so you can recover at least some of your work.

Try temporary folders

Some programs save temporary versions of files in dedicated folders while you work on them. For Microsoft Office, check the C:\Users\[username]\AppData\Roaming\Microsoft\Word\AutoRecovery folder on Windows or ~/Library/Containers/com.microsoft.Word/Data/Library/Application Support/Microsoft/Office/UnsavedFiles on Mac.

For Adobe apps, look in /Users/[username]/Library/Application Support/Adobe/Common/Media Cache Files on Mac or C:\Users\[username]\AppData\Roaming\Adobe\Common\Media Cache Files on Windows.

You may find auto-saved versions from a session before you overwrote the file. The temporary versions use obscure names but contain your original file content.

Use file recovery services

For critical business files, you can turn to professional data recovery services if you’ve exhausted all self-help options. Services like DriveSavers, Ontrack, and Gillware can attempt to recover files from storage devices in a sterile lab environment, but they typically charge several hundred to several thousand dollars.

This is an extreme last resort for valuable irreplaceable files due to the high cost. But critical databases, work files, financial documents, or personal photos may be worth the expense for a chance to recover them.

Prevent files from being saved over

To avoid this situation in the future, be more careful when saving files. Consider enabling these file protection measures for your operating system and programs:

  • Turn on automatic file history/versioning
  • Set files/folders to be read-only
  • Disable automatic file saving in apps
  • Use Source Control for code files
  • Back up files regularly

Pay close attention when clicking “Save” and choose to save a new copy instead of overwriting the existing file. Be extra cautious when working with your most important data.

Conclusion

Accidentally overwriting important files is very common, but is usually recoverable using file history, backups, auto-saved versions, or third party software. Act quickly if it happens to improve your chances. Enable protective measures for critical files. And be more attentive when saving to help avoid the problem altogether.