Business Technology

Friday 28 October 2016

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

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

Chris Graham

Published 15/04/2016 | 07:37


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

  • Go To

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."

Online Editors

Read More

Promoted articles

Editors Choice

Also in Business