Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I just finished a project and rebooted my computer. It didn't want to boot anymore so I had to use the Windows 7 system repair option. It ran for a minute and then booted up. Now most of my source code from the last 4 days of work is gone!

Background: sometimes (most often after installing new software) my notebook won't boot up anymore. It will just show the little Windows 7 flag, but not read from the hard disk anymore. If I hard-abort and reboot then, it asks me whether to start Windows normally (which won't work) or to run "Windows startup repair". If I run it, it does some stuff for about two or three minutes and then I can boot Windows again. Usually after this, .exe files I added to the computer during previous days are gone - but other files so far were not touched.

But now, after this happened, a whole bunch of ".as" (ActionScript source files) from my project are gone!

Does anyone know where and whether there's a way to recover them?

share|improve this question
2  
But you sure have checked them in into version control, did you? –  Daniel Mar 7 '11 at 22:26
1  
you did a system restore which means that windows reverted to a previous state. You're going to have to recover the data from the drive, but there's a possibility that it may be corrupted or no longer available. –  KronoS Mar 7 '11 at 22:26
    
Could it have anything to do with including the work folders in a library vs on a random folder system restore would not touch? –  mtone Mar 7 '11 at 22:30
    
but why did it touch my .as files? so far it deleted only exe files and left any other filetypes untouched. is there no report or so backup dir where it puts deleted files? –  Mat Mar 7 '11 at 22:31
    
no there's no directory that it places deleted files. This is actually a prime example of why data backups are SO critical, even if it's as simple as dropbox. –  KronoS Mar 7 '11 at 22:33

4 Answers 4

AFAIK there's no way to recover your data without using "forensic tools" like TestDisk assuming that

  • you did not use version control (SVN, GIT, etc)
  • you don't have a (recent) backup

Just a few tips for the future:

  1. If you work on critical data always assure that you have a recent backup! Always!
  2. Use a version control tool!
  3. If your machine begins to show errors or behave strangely: Fix the problems immediately. If you must: reinstall your OS and recover your data from a backup but never work with a clearly broken OS.

[edit no. 1] Another urgent hint: If you really want to recover data stop using the partition in question immediately!

Boot from a LiveCD and use dd or some equivalent tool do create a disk image of your partition. Otherwise you can accidentally overwrite the data you might want to recover, just by using your disk. When you boot your OS it usually writes data to the disk (logs, etc.) so it may overwrite your data.

If you try to recover the missing data, use a copy of that disk image. Just to be sure.

share|improve this answer
1  
Agreed - startup repair should NOT be a common occurrance. –  Kara Marfia Mar 8 '11 at 3:21
    
but it is. everytime it runs it deltes me all .exe files installed or copied on the computer since the last restore point. this time it also deleted .as (actionscript) files. maybe .as is an extension also used for some systemstuff and thus systemrestore removes them too? –  Mat Mar 8 '11 at 17:42
    
Then something is wrong. You have to fix it! Running the system recovery reverts to the last known "good" state. IIRC this also means reverting ALL changes including new/altered files. –  lajuette Mar 8 '11 at 18:26

You should check and see if "Restore Previous Versions" shows anything on the folders in question.

share|improve this answer

If you're fortunate, the restore did not write over your existing data. Maybe I've been lucky in the past, but I've found Windows to write to empty sectors of the disk. This means that even though a file is deleted, its not really deleted; just the pointer to the file is deleted.

I've had great success in recovering files using a couple of file recovery resources. Most recently I used Reuva to recover several years worth of photos for a friend when her hdd crashed. Recuva is free. There are some commercial file restore applications as well.

Whatever you do, do not install any file recovery program onto your existing disk. You'll either want to find one that will boot from a USB device or simply attach the hdd to another machine that has the file recovery program installed.

share|improve this answer

It unlinks the references, your best guess is to go for a free combiantion of TestDisk and Photorec or a paid forensics solution like WinHEX. See my nearly finished recovery post here, and set up version control and incremental back-ups next time to secure yourself... ;-)

Also, as your notebook sometimes doesn't boot; check your hard drive with above link and your other hardware too, or you might meet a more serious problem later these days.

share|improve this answer
    
joke is - i do have version control for all of my projects i just was so consumed in this project the last four days that i didn't use it. thank you for the link - i'll check it. can photorec recover sourcecode? –  Mat Mar 7 '11 at 23:29
    
@Mat: Quite a lot of stuff, I don't know for source code exactly. But it checks for references that aren't found in the directory tree anymore. A directory is simply some kind of list that points to some file entries that have information about the file (their fragments), if a list entry is removed, the file entry will still exist and sometimes even the list entry itself. This allows programs like PhotoRec and WinHEX to rebuild your directory structure, I lately removed my complete music collection with these two programs. PhotoRec seemed better for music, WinHEX for the library info... –  Tom Wijsman Mar 7 '11 at 23:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.