I run a small hosting provider with more or less 1535 customers and I use Ansible to automate some operations to be run on all servers. Last night I accidentally ran, on all servers, a Bash script with a rm -rf {foo}/{bar} with those variables undefined due to a bug in the code above this line.
All servers got deleted and the offsite backups too because the remote storage was mounted just before by the same script (that is a backup maintenance script).
How I can recover from a rm -rf / now in a timely manner?
I swapped if and of while doing dd. What to do now? – bleemboy Apr 11 at 7:02
Name:
Anonymous2016-04-15 5:20
What kind of distro lets you do that these days?
Name:
Anonymous2016-04-15 6:17
>>5 The original person who did this, from which this is copy/pasted, had his backups mounted on the filesystem. The rm -rf wiped his entire business out. Lol!
Name:
Anonymous2016-04-15 11:31
>>8 Yes, I saw the original. My point was that any decent sys admin will keep at least one set of backups completely disconnected from the system. Plus, while disk backup may be convinient, you can't rm -rf a tape drive.
Name:
Anonymous2016-04-16 5:33
damn
Name:
Anonymous2016-04-16 5:48
I howled with enjoyment when I read this hilarious comedy. Thank you >>1-, >>3-chan, for your contribution.
"The moderators on Server Fault have been in contact with the author about this, and as you can imagine, they're not particularly amused by it," Stack Overflow
said in a statement.
EWS
Name:
Anonymous2016-04-26 4:25
>>3 If he didn't intend to delete everything, why did he use the ``--no-preserve-root'' flag? The entire purpose of that option is to prevent this scenario, but I suppose web appers are too braindead to pick the right flags.
Name:
Anonymous2016-04-26 5:13
>>15 Because 1: he was making up a story 2: even if it was a real story nothing would stop him from using non-gnu utilities 3: even if the story was real and he did use gnu utilities nothing would stop him from using /* and just not mentioning it ``faggot''