Oops. Man deletes his entire company … with one line of bad code. Maybe.

Bad code
 

15 April 2016 – Marco Marsala appears to have deleted his entire company with one mistaken piece of code. By accidentally telling his computer to delete everything in his servers, the hosting provider has seemingly removed all trace of his company and the websites that he looks after for his customers.

Marsala wrote on a Centos help forum:

“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).”

The terse “rm -rf” is so famously destructive that it has become a joke within some computing circles, but not to this guy. Can this example finally serve as a textbook example of why you need to make offsite backups that are physically removed from the systems you’re archiving?

Fellow coders: “Rm -rf” would mark the block as empty, and if the programmer hasn’t written anything new, he should be able to recover nearly all of the data. Something about the story feels weird.

Leave a Reply

Your email address will not be published. Required fields are marked *

scroll to top