Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Schtibbie

macrumors 6502
Original poster
Jan 13, 2007
449
234
Ok, I did something dumb and I'm hoping a guru can explain how to get back to good state. I have Mojave. I plug in my Time Machine disk once a week and let it back up (because I keep the disk not at my office, not my home, so if house burns down...) . Last time I backed up was Aug 13. Today is Aug 22. But of course it keeps snapshots local so I have certain "points in time" in Time Machine even up to last night.

I was in Terminal, in my /Users/myname folder, and mistyped an "rm" command somehow when attempting to remove a folder under /Users/myname folder. I saw that it began to delete /Users/myname/Desktop, then /Users/myname/Documents, then Users/myname/Downloads, then /Users/myname/Library. At that point it ran into some permission issues and that's also when I managed to hit CTRL-C!!!

So I thought ok, i'll just restore from time machine using "Enter Time Machine", and selected the last time before today, which is yesterday. Problem is I'm not 100% sure what all under /Users/myname got removed! And no, you can't restore one of those user folders. It says the OS needs it and it can't be restored. So I tried just restoring the desktop and documents and downloads. THAT worked. But Library is a whole other beast. Only certain folders came back! So lotsa my apps lost their saved context. I had to select individual apps under there like Firefox. Time machine's restore doesn't seem to crawl down all folders...

I thought I could just use Migration Assistant and restore the ENTIRE MACHINE to the "yesterday" backup but guess what: the only backup I could choose was "latest backup", AFTER i had plugged in the drive (which promptly backed up my messed up drive). So - do you not get to choose point in time to restore your WHOLE MACHINE like it was yesterday, or a week ago?
 
My advice would be to try and open the Time Machine sparse bundle with Finder and just pull out your Library or potentially your entire Users directory from that; Though the listings in the sparse bundle may be a bit odd because, at least last I digged in, it uses symbolic links a lot to do its delta update thing
 
One thing you could do is to re-run migration assistant to bring over your user data from your Time Machine backup. You will need to create a new admin user account through System Preferences->Users & Groups. Once that is done, logout of your account and login to the new user account and remove your account where you deleted your files. Next follow the steps in the link below. This should recreate your account again and migrate your user data using Migration Assistant. Once that is done, remove the new admin account.

 
Last edited:
  • Like
Reactions: LuisN
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.