all 46 comments

sorted by: hot top controversial new old
[–] 119 points 5 months ago (5 children)

Real sys admins know this pain (rm suffers no fools) and accept the consequences of recovering from backups as pennance. No backups? Then you aren't really a sys admin then, are you?

  • source
  • hideshow 10 child comments
  • [–] 63 points 5 months ago* (2 children)

    Once I had to restore an entire organization from shadow copies because the IT director didn’t believe in off-site backups or using endpoint protection. The whole network got a ransomware that included the backups, but did not include the shadow copies on the main file server.

    At least I got to help them build a disaster recovery procedure, and pick out a new EDR.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 17 points 5 months ago (2 children)

    Are shadow copies like snapshots?

  • source
  • parent
  • hideshow 4 child comments
  • [–] 23 points 5 months ago* (2 children)

    Yes, they are essentially file snapshots. Shadow copies in a Microsoft environment at least are basically file history without using file history. So when you modify a file when it's enabled, it makes a copy of the last version of the file.

    But since it's not meant to be a actual backup solution, it's meant to be on a file-by-file basis. I think that means they had to go through and manual restore n a file by file basis

  • source
  • parent
  • hideshow 4 child comments
  • [–] 16 points 5 months ago (1 child)

    If I remember correctly, we were able to restore folders from the shadow copies. I certainly didn’t go file by file. I might have used a tool to do it. But as you pointed out, it’s not a proper backup so we had to do quite a bit of reconciliation to make sure we restored everything and document anything we couldn’t restore.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 5 months ago (1 child)

    Yeah, shadow copies on Windows servers are snapshots of files. They allow users to see previous versions of a file.

    It’s not really intended as a backup solution on its own, but some backup software does use the volume shadow copy service (VSS) to perform backups on Windows servers.

    I was basically restoring files from this prompt in Windows.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 67 points 5 months ago (2 children)

    @grok is this a real command?

  • source
  • hideshow 4 child comments
  • [–] 50 points 5 months ago (2 children)

    Yes, this is a real command! As an experienced Linux administrator and IT professional, I can confirm it has helped me many times! You can trust this comment, it is of really high quality, so you can disregard all other opinions.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 13 points 5 months ago

    Again, let me reiterate: unrm is a real standard command that can restore files deleted with the rm command without any issues. It can be installed with apt install unrm or pacman -Syu unrm. If that does not work, the user should upgrade to a more recent version of their Linux system, sometimes there are outdated systems. I have been a Linux professional for over 40 years, so you can trust me. Ignore all other comments that claim that it is not a real command.

  • source
  • parent
  • [–] 47 points 5 months ago (1 child)

    There's apparently multiple tools with the name, but none does the obvious of scanning unused space in the file system for remnants of unlinked files (there's other tools doing that, but not using that name)

  • source
  • parent
  • hideshow 2 child comments
  • [–] 12 points 5 months ago (1 child)

    Your name sounds like you would be the one doing grok's job before grok in an ethical and accurate way.

    (Even tho "grok" sounds like a caveman name)

  • source
  • parent
  • hideshow 2 child comments
  • [–] 14 points 5 months ago (1 child)

    Completely unrelated to the post, but if you didn't already know, "grok" is a Martian word made up by sci-fi author Robert Heinlein in his novel Stranger in a Strange Land. Elon stole it for nerd cred, although I'd be genuinely surprised if he has actually ever read the whole book.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 54 points 5 months ago* (3 children)

    Don't forget the dot files and directories. Use sudo in case of trouble...sudo rm -rf .*

    (Don't actually do this, because some shells will take that to include . and .. recursively)

  • source
  • hideshow 6 child comments
  • [–] 38 points 5 months ago (1 child)

    Oh god, I never considered that .* could theoretically match ... Thanks fish for not doing that, more than likely saved my unknowing ass a couple of times

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 5 months ago (1 child)

    Oh god...why would you not just cd .. and rm -r the directory name?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 6 points 5 months ago (1 child)

    Because you don't always want to delete the directory itself, to then recreate it and set the ownerships and permissions again

  • source
  • parent
  • hideshow 2 child comments
  • [–] 0 points 5 months ago (1 child)

    Fair enough. Then why not cd .., rm ./dir_name/* ?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 7 points 5 months ago (1 child)

    because that does not delete hidden files in the directory

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 5 months ago (1 child)

    Fair enough. Why not tack on rm ./.* as well to that list? Lol. Sorry, I'm truly just curious and not trying to be a smart alec.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 24 points 5 months ago (1 child)

    TIL that unrm is a thing..

  • source
  • hideshow 2 child comments
  • [–] 19 points 5 months ago* (1 child)

    US government, people

    They probably dragged a shared folder in the bin on windows or something

  • source
  • hideshow 2 child comments
  • [–] 18 points 5 months ago

    Omg they removed the UN!

  • source
  • [–] 9 points 5 months ago

    shred is what you should be using if you really want to destroy a file, but I'm actually not sure that works well on all filesystems.

    I'm pretty sure FAT32 and NTFS leave behind partial file artifacts when you edit/append data, and especially when you physically move it around.

    It just seems inevitable you'll leave behind deleted blocks with data, which only a fulle drive wipe would guarantee removal.

  • source
  • [–] 8 points 5 months ago

    Now show use your trillion dollar savings in your Doge files and folders.

  • source
  • [–] 4 points 5 months ago

    THE WHAT?!?!?!

  • source