Business owner deletes 1535 customer websites with one line of Bash code

Share on facebook
Share on twitter
Share on linkedin
Share on email

The owner of a small website hosting business has made what what could be called the mother of all mistakes after deleting every piece of data from his servers.

How could this have happened? Luckily we don’t have to guess because Marco Marsala posted his “faux pas” to a forum on ServerFault detailing how exactly he managed to delete everything.

As it turns out Marsala ran a Bash script which looks a bit like this:

rm -rf {foo}/{bar}

For anybody that doesn’t understand what this code means, the gist of it is that when executed, that line of code starts to delete everything with no warnings to the user.

“The “rm” tells the computer to remove; the r deletes everything within a given directory; and the f stands for “force”, telling the computer to ignore the usual warnings that come when deleting files,” the Independent reports.

Had deleting all of your data not been enough to bring tears to your eyes, Marsala also seems to have deleted any and all backups.

“All servers got deleted and the off-site backups too because the remote storage was mounted just before by the same script (that is a backup maintenance script),” Marsala told the forum in hopes of finding a solution.

A user by the name of, André Boje told Marsala in simple terms, “If you really don’t have any backups I am sorry to say but you just nuked your entire company.”

User, Journeyman Geek was a bit more helpful, explaining to Marsala that, “At this point, there’s no simple/easy automatic fix for this. Data recovery is a science and even the basic, common tools need someone to sit down and ensure the data is there.”

Thankfully however, since deleting all of that information Marsala seems to have recovered some of the data.

“We consulted a data recovery company who analysed one of our 1500+ server disks for a reasonable fee, and after diagnoses, sent you a list of recoverable files. All files are here. Now we’re finding the money to pay the recovery service for all our servers,” he told another user.

So crisis, somewhat averted then, but perhaps this will be a teachable moment to everybody that when it comes to valuable data, perhaps backing up a back up, which you may want to back up just in case, is in order.

[Via – Independent] [Image – ND BY/2.0 John Pastor]

Brendyn Lotz

Brendyn Lotz

Brendyn Lotz writes news, reviews, and opinion pieces for Hypertext. His interests include SMEs, innovation on the African continent, cybersecurity, blockchain, games, geek culture and YouTube.