@scott@lem.free.as
@scott@lem.free.as avatar

scott

@scott@lem.free.as

openpgp4fpr:358e81f6a54dc11eaeb0af3faa742fdc5afe2a72

This profile is from a federated server and may be incomplete. Browse more on the original instance.

Can one recover from an accidental rm -rf of system directories by copying those files back in from a backup?

Well I’ve joined the “accidentally trashing your system with rm -rf” club! Luckily I didn’t delete my home directory with all the things I care about, but I did delete /boot and /usr, and maybe /var (long story, boils down to me trying to delete non-system directories named those but reflexively adding the slash in front...

scott,
@scott@lem.free.as avatar

Yes but it’s hard work.

I did it from the other side of the planet. I accidentally ran an rm -rf … command on a running system. Luckily I had an identical system running that I could use to copy over the files, devices, etc.

Learning about inodes and /proc/xxx/fd works, I was able to recover enough files to then copy over the rest from the other system.

Doing it over SSH from the other side of the world was a tough 14 hours.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #