Skip to content
Data recovery lab · Denver, Colorado24/7 emergency line (720) 222-0110Check Case

Knowledge Base

Software

Deleted files, formatted drives, failed updates and corrupted software: what is still on the disk and what overwrites it.

File System Corruption

How file systems become corrupted and recovery methods

A file system is the index that tells the operating system where each file lives on the drive and which parts of the drive are free. Corruption means that index is wrong or unreadable, so the files may still be there while the computer can't find them. Typical signs are a drive that asks to be formatted, shows as RAW, reports the wrong size, opens folders with missing or scrambled names, or throws read errors that come and go.

Common causes include losing power or pulling a drive out during a write, a crash, a failing drive with bad sectors, bad cables or controllers, and malware. Each file system has its own weak points. NTFS depends on its master file table, ext4 on its superblock and inode tables, and APFS on a chain of checkpoints, and each has built-in redundancy that can sometimes be used for repair.

The risk is in the repair. Running chkdsk or fsck on a drive that is physically failing can rewrite structures and make things worse, because those tools change the disk as they work. If the data matters, first copy the entire drive to a healthy one, then try repair on the copy. If the drive clicks, disappears, or gets slow, skip repair entirely and treat it as hardware failure.

Intermediate · filesystem · corruption · software

Database Recovery

Recovering corrupted database files

A database is more than a file. It is a set of data files plus a transaction log that records changes in order, so the database can stay consistent after a crash. When something goes wrong, corruption can show up as errors on certain tables, a service that won't start, or a database that opens but returns bad data.

Common causes are sudden power loss, a failing disk, full storage, a crash during a write, and in some cases software bugs.

The best recovery is usually a backup combined with the transaction logs, which lets you restore to a chosen point in time. Without a usable backup, the route depends on the engine. SQL Server, MySQL with InnoDB, PostgreSQL, and Oracle each have their own consistency check tools and recovery modes. Some can start in a forced or read-only mode so you can export what is readable. When the files themselves are damaged, specialists can sometimes rebuild tables by parsing the data pages directly.

Resist the urge to run repair commands first. Many of them delete whatever they cannot fix. Stop the service, copy the data files and logs somewhere safe, and work on the copies. Keep all log files together with the data files, because they are often the key to a clean recovery.

Advanced · database · sql · enterprise

Deleted File Recovery

How deleted files can be recovered

Deleting a file usually does not erase its contents. On most computers the operating system removes the file's entry from the index that lists files and marks the space it occupied as available. The actual bytes stay where they were until something else is written over them. That is why deleted files can often be brought back, and also why the most useful thing you can do is stop writing to the drive.

Every action that writes to the drive lowers your chances: installing recovery software on the same drive, downloading files, even letting the computer run for hours. If the files were on your main drive, shut the computer down and use another computer to work from, or boot from a separate device.

There are important exceptions. On SSDs, the TRIM command lets the operating system tell the drive which blocks are free, and the drive may erase them soon after, so deleted files may be gone quickly. Files emptied from the Recycle Bin or Trash can still sometimes be recovered, but file names and folder structure are often lost.

Check the obvious places first: the Recycle Bin, the Trash, version history, cloud trash, and backups. If those fail, install recovery tools on a different drive and save what you find to a third one.

Beginner · deletion · recovery · filesystem

Virtual Machine Recovery

Recovering data from virtual environments

A virtual machine keeps its whole disk inside a file on the host: VMDK for VMware, VHD or VHDX for Hyper-V, QCOW2 for KVM and QEMU, and VDI for VirtualBox. Inside that file is a complete disk with its own partitions and file system. That means there are two layers that can fail: the host storage that holds the file, and the guest file system inside it.

Typical losses include a deleted VM, a host disk that failed, a datastore that no longer mounts, a virtual disk file that is corrupt, or a guest operating system that won't boot. Snapshots add another wrinkle. A snapshot freezes the original disk and writes changes to a separate delta file, so the current state of the VM is the base disk plus a chain of deltas. Lose or damage one link, or delete files thinking they are old, and the chain won't merge.

Recovery generally starts at the lowest layer: image the host storage, rebuild the datastore, find the virtual disk files, then open each one and recover files from the guest file system.

Don't consolidate or delete snapshots on a damaged VM, and don't keep powering it on. Copy the entire VM folder, with all its files, before trying anything.

Advanced · virtual · vm · hypervisor

Email Recovery

Recovering emails from various clients and servers

Email lives in different places depending on how it is set up. Outlook stores a local mailbox in a PST file, or an OST file, which is a cache of an Exchange or Microsoft 365 mailbox. Thunderbird uses MBOX files. Apple Mail keeps messages as individual files. Gmail and most web mail hold the main copy on the provider's servers.

That difference decides what recovery is possible. If your mail is on a server, check the provider first: deleted items folders, recoverable items, and administrator tools often hold messages for a limited time. If the mail is only in a local file, the file is what counts. A PST that is damaged, or has grown too large, can sometimes be repaired with Microsoft's own scanpst tool, which is worth running on a copy of the file, not the original. An OST can often be converted into a PST by specialized tools, which is useful when the server account is gone.

If the drive holding the mail has failed, deal with the drive first. Make an image, then look for the PST, OST, or MBOX files on it.

Intermediate · email · pst · exchange

Linux File System Recovery

Recovering Linux file systems

Linux supports many file systems, and the right recovery approach depends on which one you have. Ext4 is the most common default. XFS is widely used on servers. Btrfs is common on some distributions and NAS boxes. Many systems also stack extra layers underneath: LVM volumes, software RAID through mdadm, and LUKS encryption.

Start by finding out what is actually on the disk. The lsblk and blkid commands show partitions, file system types, and any encryption. Then copy the disk with ddrescue to a healthy drive, because the file system tools below write to the disk they check. Run fsck on a copy, or on an unmounted device, never on a mounted one.

Ext4 keeps backup copies of its superblock, which lets e2fsck repair a file system whose first superblock is damaged. XFS has xfs_repair, and it will refuse to run if the log is dirty until you mount the file system or deliberately zero the log, which can lose recent changes. Btrfs has a more cautious approach: read-only mounts and the restore command come before any repair, since btrfs check with the repair option can make things worse.

For deleted files on ext4, results are limited because the system clears some metadata on deletion. Carving by file type may help.

If the drive is clicking or the system reports I/O errors, stop and treat it as hardware first.

Intermediate · linux · ext4 · xfs

Windows File System Recovery

NTFS and FAT recovery techniques

Windows uses NTFS on almost every internal drive, and FAT32 or exFAT on many USB sticks and memory cards. A newer system, ReFS, appears on some servers.

NTFS keeps a master file table, or MFT, which has an entry for every file and folder, including names, dates, and where the data sits. It also keeps a partial backup of the first records, and a journal of changes. If the MFT is damaged, a drive may show as RAW, but the data and many of the MFT records can still be there. Recovery tools parse what remains, and where records are gone, they fall back to carving by file type. FAT systems work with a file allocation table and a directory structure. They are simpler, and they are easier to damage, because a file's fragments are chained together through the table.

Before reaching for specialist tools, check what Windows may already hold. Previous Versions and shadow copies, File History, OneDrive version history, and the Recycle Bin can restore files with no recovery at all.

Resist the prompt to format when Windows says the drive needs it. Also resist running chkdsk with repair options on a drive that might be failing, since it modifies the disk, and it can truncate or delete files it considers damaged. Copy the drive to an image first, then try repair on the image.

Intermediate · windows · ntfs · fat

macOS Data Recovery

Apple file system recovery methods

Modern Macs use APFS, the Apple File System. It organizes space in containers that hold several volumes, supports snapshots, uses copy-on-write so changes do not overwrite old data in place, and can encrypt volumes with FileVault. Older Macs and many external drives use HFS Plus, and exFAT is common for drives shared with Windows.

Recovery depends on the Mac. On Intel Macs without a T2 chip, the drive can be removed and read by other tools. On Macs with a T2 chip, and on all Apple silicon Macs, internal storage is encrypted with keys tied to the hardware, so the data usually can't be read once it is moved to a different machine. In those cases a board-level failure may mean data is lost unless a backup exists.

Check for Time Machine backups and for local snapshots, which Time Machine keeps on the Mac for a limited time. iCloud Drive and iCloud Photos may hold copies. Disk Utility's First Aid can fix some file system damage, but run it only after copying anything you can.

If a Mac won't boot, try Recovery mode to check the disk, and Target Disk Mode (on Intel) or Share Disk mode (on Apple silicon) to reach files from another Mac. Keep your FileVault password or recovery key.

Intermediate · macos · apfs · filevault

Version Control Recovery

Recovering data from version control systems

Git keeps a complete history of a project, which makes it good at recovering lost work, but only work that was committed. Anything that was never added or committed lives only in the working folder, and if it is deleted or overwritten, Git can't bring it back.

If you committed something and then lost it, start with git reflog. It records where the tip of each branch and HEAD has been, including after a bad reset, a rebase gone wrong, or a deleted branch. Find the commit you want, then create a new branch pointing at it. Files that were staged with git add but never committed may still exist as unreferenced objects. The git fsck command with the lost-found option lists dangling commits and blobs that you can inspect and restore.

Git eventually removes unreachable objects during garbage collection, after a delay, so act sooner rather than later. If a repository's own files are damaged, a clone on another machine or a remote such as GitHub is often the quickest repair, since each clone holds the whole history.

Avoid commands that rewrite things, like git gc with aggressive pruning, until you have copied the entire folder, including the hidden dot git directory. If the disk itself failed, recover the whole folder from the drive image, not just the visible files.

Intermediate · git · version control · repository

Container Data Recovery

Recovering data from containerized applications

Containers such as Docker package an application with its dependencies, but they are not meant to hold data. A container's writable layer is deleted when the container is removed, so anything the application wrote there goes with it. Data that should survive lives in volumes or bind mounts, which are stored outside the container.

On a Linux host running Docker, named volumes normally sit under the Docker data directory, often /var/lib/docker/volumes, and images and container layers are kept nearby. A bind mount is just a folder on the host.

The common losses are familiar. Someone runs docker system prune with the volumes option and deletes volumes that no container was using at the time. A container is recreated without its volume attached, so the application starts fresh and seems to have lost everything, though the old volume still exists.

Before assuming data is gone, list the volumes and check for old ones that are not attached. If a host disk fails, recovery means imaging the disk, then finding the Docker data directory or the application database files and rebuilding from there. Databases in containers need the same care as any database: stop the container before copying files.

Back up volumes and databases explicitly; images alone save nothing.

Advanced · docker · containers · volumes

Virtualization Recovery

Virtual machine data recovery techniques

Virtualization lets one physical server run many virtual machines, so one hardware or storage failure can take down dozens of systems at once. Recovery has to work at the level where the failure happened.

At the bottom is the host storage: disks, a RAID controller, or a shared storage array, formatted with a file system the hypervisor understands. VMware uses VMFS and Hyper-V uses NTFS or ReFS, among others. If that layer is lost, the first job is to rebuild the array and the datastore, then find the virtual machine files. Each VM is a set of files: virtual disks, a configuration file such as a VMX for VMware, and snapshot files.

Snapshots are a frequent source of trouble. They are not backups, because they depend on the original disk, and a long chain of them can fill a datastore, slow the VM, or fail to merge. Deleting snapshots or moving files on a damaged datastore can break the chain.

Good protection means backups taken through the hypervisor's own tools, stored away from the host, and tested by restoring a VM to different hardware.

If a datastore goes offline, do not reformat it or let the system re-initialize it. Label the disks and note the RAID settings before touching anything.

Advanced · virtualization · vmware · hypervisor

Archive Recovery

Recovering compressed and archived files

A ZIP, RAR, or 7Z file packs many files into one container, and the container has its own structure. ZIP keeps a directory at the end of the file that lists every entry. RAR and 7Z keep their own headers. When a download is cut short, or the drive holding the archive develops bad sectors, the damaged part is often that directory or header, and the program refuses to open the whole thing even though most of the data is intact.

Archivers have a repair mode, and it is worth one try on a copy. WinRAR can rebuild the index of a RAR or ZIP by scanning for entries, and other tools can walk through a ZIP file looking for the small header in front of each stored file. Damage inside one compressed file usually costs that file and not its neighbors. In solid RAR and 7Z archives the files are compressed together, so damage can reach the files after it. RAR archives made with a recovery record can repair themselves, if whoever made them turned that option on.

Never repair the only copy. Encrypted archives are harder, because corruption in an encrypted block can ruin everything after it. If the archive sits on a drive that clicks or keeps disappearing, the drive is the real problem, so image it first.

Intermediate · zip · rar · compression

Cross-Platform Recovery

Recovering data across different operating systems

Every operating system prefers its own file system. Windows uses NTFS, macOS uses APFS, Linux uses ext4 or similar, and cameras and USB sticks use FAT32 or exFAT. When a drive moves from one system to another, trouble can follow. A Mac can read an NTFS drive but not write to it without extra software. Windows cannot read APFS or ext4 at all, and it will offer to format a drive it does not understand. That prompt is the most dangerous thing on the screen.

Recovery across platforms means identifying the file system correctly and using software that can parse it. A Windows recovery tool run on a Mac-formatted drive may find nothing, or may misread the structure and return garbage. Drives sometimes have two systems in two partitions, as with a Windows and Mac dual-boot, or a drive formatted differently from what its label says.

If a drive from another system will not open, do not agree to format it. Look at the drive's description in Disk Management on Windows or Disk Utility on a Mac, and note the format it reports. For shared drives, exFAT is the common format both systems read and write, though it has no journal and is easier to corrupt after an unsafe removal. Always eject the drive properly before unplugging it.

Advanced · cross-platform · compatibility · multiple os

Windows Update Failure

Stuck updates, boot loops, and your files

A Windows update that fails can leave a PC restarting in a loop, stuck on its update screen, or rolling back over and over. Your files are usually untouched; the damage is to system files or boot settings.

Windows recovery options such as uninstalling the latest update or System Restore don't delete personal files. Options labeled Reset this PC, or a clean install, do: they remove files or wipe the drive, depending on the choice.

After a major upgrade, Windows keeps the previous installation in a Windows.old folder for a limited time, which can hold files that seem to have gone missing. If the update coincided with drive noises or extreme slowness, treat it as a possible hardware failure first.

Intermediate · windows update · boot loop · windows.old · recovery options

macOS Update Problems

Stuck installs and Macs that won't boot after an update

An interrupted or failed macOS update can leave a Mac stuck on the Apple logo with a progress bar, restarting repeatedly, or showing a prohibitory symbol. Because recent versions of macOS keep the system on a separate, sealed volume, your Data volume is usually unaffected.

Reinstalling macOS from Recovery normally replaces the system without touching personal files. Erasing the disk, or choosing to erase during setup, does not.

If Disk Utility reports errors on the internal disk, or the Mac is slow and noisy, stop and protect the data first. On Macs with Apple silicon, the internal storage only works with that Mac, so backups are especially important.

Intermediate · macos update · recovery mode · reinstall macos · mac

Linux Won't Boot

GRUB errors and kernel panics

A Linux system that drops to a GRUB rescue prompt or a kernel panic after an update usually has a boot configuration problem, a missing kernel or initramfs, or a damaged root file system. User data in the home directory is often untouched.

Booting from a live USB lets you see whether the disk and partitions are intact. If the file system mounts read-only without errors, copying important data off first is the safe move before trying boot repairs.

Be cautious with fsck on a disk that's throwing I/O errors, and with reinstalling over an existing system. If the disk uses LVM, software RAID, or encryption, note those layers before changing anything.

Intermediate · linux · grub · boot failure · kernel panic

Emptied the Recycle Bin or Trash

Files deleted past the recycle bin

Emptying the Recycle Bin or Trash removes the files' entries from the file system, but on a hard drive their data usually stays until new data overwrites it. On SSDs, TRIM often clears the deleted blocks quickly, which makes recovery much less likely.

Use the computer as little as possible from that moment. Every download, update, and browser session writes data that could land in the freed space.

Check backups first: Time Machine, File History, cloud services with their own recycle bins, or an external drive. If there are none and the files were on a hard drive, recovery software run from another drive, or a lab, can often bring them back.

Beginner · recycle bin · trash · deleted files · undelete

Shift+Delete and Network Share Deletions

Deletions that skip the recycle bin

Shift+Delete in Windows, command-line deletion, and deleting from many apps bypass the Recycle Bin entirely. Files deleted from network shares, mapped drives, and many USB drives don't go to your local Recycle Bin either.

For network shares, the server may have its own protection: snapshots, shadow copies available through Previous Versions, a NAS recycle bin, or backups. Ask your IT administrator quickly, since snapshots rotate out.

On the local drive, the situation is the same as an emptied Recycle Bin: stop writing to the drive, and recover from backups or with tools run from another drive.

Intermediate · shift delete · network share · deleted files · previous versions

Saved Over a File by Mistake

Getting back the previous version

Saving over a document replaces its content, and the old version doesn't go to the Recycle Bin. Depending on how the program saves, the old version may survive on a hard drive as deleted data or be overwritten in place; on SSDs it's usually cleared quickly.

The best options come from versioning: Previous Versions or File History on Windows, Time Machine or an app's Revert To history on a Mac, and version history in OneDrive, Google Drive, Dropbox, or SharePoint. Office apps also keep AutoRecover files for unsaved changes.

Check those first, quickly, before they rotate out. Then consider turning on versioning for the folders where you do most of your work.

Beginner · overwritten file · previous versions · version history · autosave

Corrupted Office Documents

Word, Excel, and PowerPoint files that won't open

Modern Office files (.docx, .xlsx, .pptx) are actually ZIP archives of XML files and media. Damage to one part, such as a broken image or a truncated save, can make the whole document refuse to open even though most of its text is intact.

Office's Open and Repair option fixes many problems. Previous versions, AutoRecover files, and cloud version history are often faster routes to an undamaged copy.

When those fail, the archive can be opened and its parts examined individually to salvage text, sheets, or slides. If many documents are damaged at once, suspect the drive or ransomware rather than the files.

Intermediate · microsoft office · docx · xlsx · corrupted document

Reset This PC

Keep my files vs Remove everything

Windows Reset this PC offers two choices. Keep my files reinstalls Windows and removes apps and settings but leaves personal files in your user folders. Remove everything deletes all files and, if you choose to clean the drive, also overwrites the data.

After a Remove everything reset without drive cleaning, data on an unencrypted hard drive may still be recoverable, because the reset reformats and writes a new system rather than erasing every sector. On an SSD, with drive cleaning, or with device encryption turned on, recovery is unlikely.

If a reset happened by mistake, stop using the computer, don't continue setup longer than necessary, and don't install programs.

Intermediate · reset this pc · windows · factory reset · deleted files

Hidden Files on a USB Drive

When malware makes your files disappear

A USB drive that suddenly shows only shortcuts, or appears empty while still reporting used space, has often been hit by malware that hides the real files by marking them as hidden system files or moving them into a hidden folder.

The files are usually still there. Scanning the drive with up-to-date security software on a clean computer, then showing hidden and protected system files or clearing those attributes, typically reveals them.

Don't format the drive until you've checked, and don't double-click unfamiliar shortcuts on it; they often run the malware again.

Beginner · usb drive · hidden files · shortcut virus · malware

More categories