Labels

Friday, April 15, 2016

Man 'deletes his whole company' after typing wrong bit of code by Chris Graham

http://www.independent.ie/business/technology/man-deletes-his-whole-company-after-typing-wrong-bit-of-code-34629615.html

Hosting provider Marco Marsala accidentally deleted his company after typing in a line of bad code.

15/04/2016
If ever there was a time you wish you could click 'undo', this would be it.

But while most people are often rescued by the quick 'control+z' command - seeing their entire document return to the screen after inadvertently deleting it all - there was no such saving grace for Marco Marsala.
The hosting provider wrote on help forum Server Fault that he had accidentally entered a code that seemed to have wiped his computers, including the websites of his customers. 
The command, "rm -rf", deletes everything it is told to and blocks the helpful warnings that usually inform the user that something is being deleted. In this case, because he hadn't specified what he wanted deleted, it erased everything.
“I run a small hosting provider with more or less 1,535 customers and I use Ansible to automate some operations to be run on all servers,” wrote Marco Marsala.
“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 response from the forum was far from positive.
“If you really don't have any backups I am sorry to say but you just nuked your entire company”
"If you really don't have any backups, I am sorry to say but you just nuked your entire company," wrote Andre Borie.
Another, Michael Hampton, said: "You're going out of business. You don't need technical advice, you need to call your lawyer."
One respondent pointed out - rather unhelpfully - that Mr Marsala should have kept the backup separate from everything else.
"Backups need to be offsite, offline, and incremental," said Tim. "That you could delete them from your main server means they weren't what I would call backups."


UPDATE: Marco Marsala's post on Server Fault:
http://serverfault.com/questions/769357/recovering-from-a-rm-rf

UPDATE: That man who ‘deleted his entire company’ with a line of code? It was a hoax:
http://www.pcworld.com/article/3057235/data-center-cloud/that-man-who-deleted-his-entire-company-with-a-line-of-code-it-was-a-hoax.html