This resource is intended to be sort of a guideline what to do in order to rescue the data in case of operating system failure or accidental deletion. The main focus will be on the Microsoft Windows, but applicable to the other operating systems as well.
Before anything happens
There are quite a few things you can do to ensure the relative safety of your data before anything even happens.
Backup
This is the number one rule! You are writing a thesis? A computer program? Creating resources offline for Wikiversity? In all of these cases you are dealing with small files, but you put a lot of your time into them. At the end of each day you should backup these to a USB flash drive, memory card, or to your email inbox or Cloud storage in case you have access to the Internet. For larger files use external harddisc or a bigger USB flash drive. If the available space for backup is limited, consider data compression (i.e. to zip, rar or 7z). Compression algorithms are particularly efficient on files with human-readable content.
Support for some file formats for both user data and backups, such as Acronis backup .tib
, may be limited on different systems, or only readable through paid software. Such proprietary file formats restrict data portability through vendor lock-in and thus should only be used with caution.
Create a file list
If you currently lack the storage to back up large amounts of data, a recursive file list should be created. Such a list has a marginial file size compared to a disk, making it very portable.
A list of files and the directory structure which also contains file sizes and date/time attributes can facilitate the guesswork that would be necessary to recover data after a file system corruption.
Such a file list can be created using these example commands:
- Windows:
dir /s %userprofile% >>filelist.txt
– Creates a recursive file list of your user directory with sizes and last modified time stamps of minutely accuracy by default. The/T:C
,/T:A
, and/T:W
options allow specifically showing the creation, last access, and last modification times respectively.>>
redirects the output to a specified file. Only one>
should only be used with caution, as it clobbers (overwrites) any existing file with the given name rather than appending to it. - Linux:
ls -alR ~ >>filelist.txt
produces a similar output.~
is the user's home directory variable. Any other path may be used.find ~ >>filelist.txt
produces a plain recursive list with full paths and file names, and can be used to back up the directory structure.find
with no arguments outputs paths relative to the current working directory, and the-type d
makes it only output folder names, no file names.stat *
produces a detailed list of entries in the current working directory, with all time attribute types in full accuracy. However, the command lacks support for recursion, which means it can not scan through subfolders automatically.
Divide your HDD?
Dividing your hard drive into 2 partitions, one for backup and one for the operating system was a cheap way to help protect your data if your operating system becomes corrupt. The problem is though, if your hard drive crashes you can still lose everything. But now that prices have dropped on hard drives, backing up all important data on an external hard drive is the obvious, easy solution. Furthermore, even if your operating system becomes corrupt, there are ways to recover your data.
Use the Recycle bin
Enable the "Recycle bin" in Windows to save files before final deletion. This may take a little more time, but you can easily bring them back if you change your mind, or in case of accidental deletions.
I have a problem...
Sooner or later you might face a situation, that your computer goes down and you are not able to access your data. Depends on the circumstances there are several possibilities to make things right, or at least rescue what could be rescued. Some of the scenarios are listed below.
Recovering data after physical damage
If your hard disk drive (HDD) was physically damaged or exposed to a magnetic field, then often your only choice is to send it to a recovery lab if need be. Such labs have clean rooms where they can open the case, remove the platter(s) and then try to recover what they can. Expect such services to cost far beyond the price of any new computer system, with no guarantee of success.
Accidental deletion or format
For this section we start with some background information:
If you delete something in Windows or format a harddisc with the "quick" format (the one which takes a few seconds) your data are not completely gone. The operating system just lets some other data to be written on the same place. In fact this replacement causes the final data loss.
Quick formatting overwrites the previous file system, but file contents themselves still exist as orphaned file fragments on the disk. Those need to be puzzled together.
So if you deleted something, but it is not rewritten yet, you can get these "lost" data back with help of special data recovery programs. You have to google for these. In general you have better chance to retrieve smaller files compared to big ones. This is because if only a part of a big file is rewritten with something else it may cause the loss of the whole file.
If you are trying to rescue data from a formatted operating system partition (C:\
drive in Windows), it is not the best sollution to install the operating system and then try to rescue (undelete) files with a program. This is because during the installation procedure you can rewrite the data you want to rescue. If you have the possibility, better connect the HDD to another computer and do the recovery process from there. If you wish to do continue using the source hard drive, first create a full disk image on a different hard drive. The disk image file is as large as the source disk itself, and contains all data that would have been recoverable. Data recovery software usually allows scanning disk image files.
Sidenote: Although this resource is about data rescue rather than data destruction, please note that there are programs for secure data erease. These rewrite (usually some sensitive or confidental) data with random bits of information, so they can't be recovered afterwards.
System failure (best case)
Your Windows system went down. First thing you should check if you can restore it with a few moves. When restarting your PC press F8 (at least for Windows XP). There you can try to start "Last good configuration". If this doesn't work, try to boot up the "Safe mode" and correct the potential error there whatever it is. You can use the safe mode to rescue your data as well.
System failure (still good)
Your Windows system went down. You can't restore it via "Last good configuration" nor "Safe mode". Next thing what you can try is reinstall the corrupt or missing system files via a Windows installation CD.
For this insert the CD and restart your computer. Bring up the boot menu (usually F11 or F12) and boot it up. Select the "Repair" option and follow the steps there. Please note, that for this procedure you will most probably need the "administrator password" that you set, when you installed Windows last time.
System failure (bad, but not hopeless)
Your Windows system went down. You can't restore it via "Last good configuration" nor "Safe mode". The "Repair" procedure failed. You know, that you will have to reinstall the operating system, but you still have important data on the C drive. Remember: All files on the Windows desktop are on the C drive!
Before reinstalling the whole system and the eventual danger of rewriting important files (as mentioned earlier) you can use some Linux distributions to access your data. These are called "Live" versions, which means that you don't have to install them to your machine, but you can run them from a CD/DVD/USB directly. These are available for free, so you can just download and burn them. You can pick any Live distribution you want.
The original author of this resource suggests SLAX, because it is small and very user friendly even for the non-experienced Linux users. (In fact the initial version of this resource was written on a crashed Windows machine with SLAX's KWrite. Thank you guys for this, whoever you are!)
Re-installation procedure
If you still have some data on the C drive you want, you can try to reinstall Windows without formatting the hard disk. In this case the Windows installation overwrites or renames the previous version, so the rest of the HDD could be saved.
However, for the duration of the installation, it is still recommended to have a backup of the partition. On some setups, the operating system partition is smaller than the secondary partition, which saves time on the backup.
To the end
On this page you can find some, but surely not every possibility for data rescue or good practice in order to keep your files as safe as possible. If you know about some other way, tell us!
See also
![]() |
Search for Data recovery on Wikipedia. |
- Topic:System administration
- Data Recovery - Further reading section on Wikipedia