A man deleted his entire company with a single line of mistaken code

UPDATE: Anyone fearing a similar mishap in their own businesses will be pleased to hear that it turns out Marco Marsala didn’t really delete his entire company. In an interview with Italian news site La Reppublica he admitted his ruse was a marketing scheme: “The command that I mentioned in the article is harmless but it seems that almost no one has noticed … With the inaccuracies that are in the online comments I could write a book.”

A man deleted his entire company with a single line of mistaken code

If you think you’ve had a bad day at the office, we imagine that it won’t have been half as upsetting as Marco Marsala’s. 

It appears that Marco accidentally deleted his entire company with one, simple, mistaken piece of code. He runs a hosting business but is now in serious trouble after deleting everything in his servers.

Marco took to expert web forum Server Fault to ask how he might correct his error. It seems that Marco ran the notoriously dangerous command “rm -rf”, a basic line of code that destroys everything it’s told to. 

It works a bit like a mathematical equation – the “rm” tells the computer to remove, the “r” deletes everything within a set directory parameter (in Marco’s case, everything), and the “f” stands for “force”, which overrides any safety warnings that might usually flag in such circumstances. 

Marco’s entire company vanished in four letters. You can run the code, usually, when deleting certain files, but Marco didn’t specify any category. 

He wrote on the forum: “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.

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

Marco explained that the code had also deleted the backups he’d compiled in the event of a catastrophe. Pretty much every user on Server Fault concluded that Marco wouldn’t be able to retrieve any of his lost data.

“I feel sorry to say that your company is now essentially dead,” wrote Sven on the forum.

“You might have an extremely slim chance to recover from this if you turn off everything right now and hand your disks over to a reputable data recovery company.”

Michael Hampton added: “You’re going out of business. You don’t need technical advice, you need to call your lawyer.”

Many others on Server Fault were blunt, and some weren’t exactly helpful. It’s a terrible situation for Marco, and we feel for him. 

READ NEXT: Addressing gender imbalance – the TechTalent Charter

Disclaimer: Some pages on this site may include an affiliate link. This does not effect our editorial in any way.

Todays Highlights
How to See Google Search History
how to download photos from google photos