Make backups, kids

So yesterday I had that biggest mindfart ever, while doing some maintenance to Testii, Flashii's public test preview, I deleted every file in the www folder.

Now you're probably wondering; “How does that even happen?” Well I wanted to purge the uploads folder so I did a rm -rf *, this was my first mistake since I should’ve gone up a directory and rm -rf'd just the uploads dir or left the r flag out since the uploads dir doesn’t have subs had it not been for the r flag only a single experimental file would’ve been lost. But that still doesn’t explain how I managed to delete everything which is where the real kicker comes in, I absentmindedly entered cd .. twice before executing the command... Yeah it just keeps getting better...

I could blame rm for not having a confirmation, especially when using the r and f flags, but the fact of the matter is that I just fucked up and I’ve accepted that. I should’ve made backups and I should’ve been more cautious before using a command that forcibly and recursively destroys everything in its path...

Anyway, I guess I’ll lay out the losses also. All databases were unaffected by all this so stuff I kept on git was back up within a 10-minute timeframe. A lot of archived stuff was lost, none of it was really important but it’s mainly just sad that it’s gone now. is pretty much entirely gone which is kind of inconvenient since it was still used for some assets but fixing that is as easy as updating references to I’m also taking this opportunity to kill oniichan, since like everything on it is gone anyway, in favour of an archive section on, despite the domain being really cute it costs me nearly €20 a year and it literally goes towards nothing.

So yeah, the morals of this story; don’t use flags you don’t actually need on commands and make backups... or just don’t be me, that should work too.

Posted 2016-12-05 16:35:14