Server admin accidentally destroys company’s data with one line of code

Image courtesy: business today

In a coding fiasco, a man accidentally deleted all the data of his company and its clients with just one line of code.

Marco Marsala ran a web hosting company which had over 1,535 customers. The code destroyed all the files including the files of the customers’ websites.

The code ‘rm-rf ‘ not only deleted everything, but also blocked the helpful warnings that usually inform the user before the deletion.

According to reports, he hadn’t specified what he wanted to delete which resulted in the total wipe out.

“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,” he said.

Marsala confirmed that the destructive code even flushed out all of the backups as the backup drives—that were backing up at the time—were mounted to the server system.

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

Also read: 

Police law exempts no goat in Chhattisgarh