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 when I should not have). I have backups of those as well, so what are my prospects of recovering from this by just copying them back in using a live USB? Only issue is they’re stored in my server as belonging to the server user (I assume everything in those directories should belong to root and I can just use chown?) But I also don’t know if they retain the same permissions when backed up.

Has anyone had any luck recovering a system in this way? I’m hoping not to have to reinstall everything because I had gotten pretty cozy with the current installation.

  • The Doctor@beehaw.org
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 year ago

    Your chances are pretty good if you copy them back - ultimately, that’s what the restoration function of backup software does.

    As for ownership of the directories and files, that’s a bit trickier and might involve some trial and error. root:root is a safe bet for most of it, but there is a lot of stuff in /var that is owned by system accounts.

    What distro are you running? That’ll help figure it out.

    • Marxism-Fennekinism@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      4
      ·
      edit-2
      1 year ago

      I’m running Fedora 39 KDE. I think I’m going to see what the file metadata of my other Fedora systems look like and try to replicate that. Worst case I just reinstall. At this point I’m a little curious how the system will react.