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've been designing a website for the past couple of weeks on my local server and I made some quick last changes before the meeting later this day.

Being new with OS X, I copied the folders over to the ones I am developing, hoping that only the new / changed files would be updated.

I was horified to find out that it removed all the contents of my previous folders which contain all my code. Can anyone help me? Obviously backup isn't one of my options since this issue is well out of my idea before. Any help please?

share|improve this question
    
i realise this'll sound snarky, but isn't unforeseen loss the point of backups in the first place ? - You should be able to recover the files forensically though, but i think apple's have something called timemachine don't they ? Not a mac user myself, but i think that'll work if its enabled. –  Sirex Oct 19 '11 at 8:47
    
Upgrade to OS X Lion. It finally fixes this issue. –  Daniel Beck Oct 19 '11 at 9:00
add comment

1 Answer 1

up vote 3 down vote accepted

This is one of the biggest "flaws" in OS X, if you think of it as a long-time Windows user. Copying one folder over another one will not merge them (like in Windows), but replace the contents of the destination folder, thereby erasing it completely.

The message actually says, "do you want to replace it?"

Of course, you can't be blamed. The real problem with this behavior is not that it replaces the content. It's that the original destination folder is not moved to Trash. It is completely gone.

Your only options are to

  • restore from a Time Machine backup (something you should always use when getting a Mac)
  • restore from a remote repository (which is something I'd recommend for any coding you'll do in the future)
  • stop using the Mac and try to recover files, but I personally don't know if that's even realistic. Tools like Data Rescue 3 exist, but I can't recommend any, as I've never been in that situation.
share|improve this answer
    
I don't have the Time Machine on so as to conserve disk space (I think). And and a remote repository isn't available either since I'm using the built in web server for mac. Lastly, I indeed tried out Disk Drill and it DID find my source codes but it requires a pro version and what's more alarming is when I exited it and rescanned, my sources weren't even there anymore. :( –  Registered User Oct 19 '11 at 9:04
    
@Shedo Time Machine backs up to an external drive – it does not consume disk space on your Mac itself. A remote repository (for example using github) is just there to archive and store your code somewhere else, you can still run it on your local web server. –  slhck Oct 19 '11 at 9:06
    
@Shedo As for the data recovery tools, there are probably plenty of them, but any further disk activity might overwrite your already deleted source files, especially if you're low on hard disk space. –  slhck Oct 19 '11 at 9:07
    
Thanks for the help guys. I managed to recover an older copy of my codes which are a few days old so I guess I'll just have to work from there. I'll be sure to keep in mind to have a backup next time. And the meeting got cancelled after all after the client had urgent matters to attend to. Thanks a lot! –  Registered User Oct 19 '11 at 11:09
1  
@Shedo I see, well, good luck then for your future work! ;) –  slhck Oct 19 '11 at 11:09
add comment

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.