Free Republic
Browse · Search
General/Chat
Topics · Post Article

Skip to comments.

Man Deletes His Whole Company With One Bad Line of Code
www.popularmechanics.com ^ | Apr 14, 2016 144 | By Eric Limer

Posted on 04/14/2016 11:38:37 AM PDT by Red Badger

Thanks to just one mistake, he instructed the computer to delete everything it could find.

The next time you accidentally close a file without saving, just keep in mind that it could be worse. You could be Marco Marsala, a hosting provider who accidentally and irrevocably deleted his entire business with a faulty line of code.

As Marsala wrote on Server Fault, a forum where he was asking for help with the bind he'd gotten himself into, "I run a small hosting provider with more or less 1535 customers ...All servers got deleted and the offsite backups too."

A dire situation for certain, but one that Marsala was apparently hopeful he could rectify. "How I can recover from a rm -rf / now in a timely manner?" his plea for assistance ends.

That "rm -rf/" is the troublesome line that got Marsala into trouble. It is, essentially, a command that will forcibly delete data without asking for confirmation. As The Independent explains:

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.

... [Because] of an error in the way it was written, the code didn't actually specify anywhere – and so removed everything on the computer.

Why was Marsala running this command at all? It was actually part of his backup procedure, presumably intended to delete old backups. But due to the lack of specificity, it just deleted everything it could get its hands on—including customer websites. Because Marsala didn't have a backup somewhere that was completely isolated from what this particular command could touch, it all went away. It's probably gone forever, according to the experts on Server Fault.

The lessons to be learned here? A few: Always double check instructions to delete anything. Make sure you back up your important data offline. And last but not least, a computer will always do exactly what you tell it to do. If it doesn't do what you wanted, you are the one who messed up.


TOPICS: Business/Economy; Computers/Internet; Society
KEYWORDS:
Navigation: use the links below to view more comments.
first previous 1-20 ... 41-6061-8081-100101 next last
To: HombreSecreto

or rm -rf/OBAMA


81 posted on 04/14/2016 1:10:09 PM PDT by ImJustAnotherOkie
[ Post Reply | Private Reply | To 3 | View Replies]

To: I want the USA back

let this be a lesson: coffee first, then bash


82 posted on 04/14/2016 1:16:10 PM PDT by thoughtomator
[ Post Reply | Private Reply | To 77 | View Replies]

To: Red Badger
1. External storage drive.

2. Keep if OFF except when storing something.

83 posted on 04/14/2016 1:18:39 PM PDT by pabianice (LINE)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Red Badger

Wanna get away?


84 posted on 04/14/2016 1:20:31 PM PDT by dfwgator
[ Post Reply | Private Reply | To 1 | View Replies]

To: Red Badger

At least he didn’t type “Google” into Google, he could have taken down the entire Internet.


85 posted on 04/14/2016 1:21:48 PM PDT by dfwgator
[ Post Reply | Private Reply | To 1 | View Replies]

To: MortMan
If offsite backups are available online, they aren’t backups.

They are simply copies.

Sad but true. Another thing to keep in mind is the objective - recoverability. Backups are just part of the solution...not the objective.

86 posted on 04/14/2016 1:28:25 PM PDT by no-s (when democracy is displaced by tyranny, the armed citizen still gets to vote...)
[ Post Reply | Private Reply | To 17 | View Replies]

To: Red Badger

Hardware is cheap but data is priceless. That is why I have multiple redundant backups.

First, all of my data is stored on a network array that automatically backs up all data as it is entered. If one of the drives in the array fails, I lose no data.

Second, every PC on my network has an extra hard drive and the network hard drive is automatically backed up to each of those drives at various times during the day. If multiple drives in my network array were to fail simultaneously, I would lose no more than a few hours of data and could be up and running immediately, using any one of my network PCs as a temporary server.

Third, I back up my network array to a removable hard drive every night (I have several) and I take the most recent one home with me each night. If my office burns down to the ground, I will lose no more than one day of data.

Fourth, every weekend I back up my most recent removable hard drive to my home network.

Finally, I have a cloud backup that also runs every night and encrypts and stores my data on a cloud drive account. If my entire city is wiped out all of my data is still stored somewhere else. I would never rely on a cloud drive as my primary backup (they are too slow to restore data from and are outside of my control), but it is a good last line of defense.


87 posted on 04/14/2016 1:29:43 PM PDT by Bubba_Leroy (The Obamanation Continues)
[ Post Reply | Private Reply | To 9 | View Replies]

To: Red Badger

I wish they’d delete the internet and we could all get back to living our real lives ...


88 posted on 04/14/2016 1:30:32 PM PDT by Trump-a-licious
[ Post Reply | Private Reply | To 1 | View Replies]

To: GraceG

Gotta be quick! ;-)


89 posted on 04/14/2016 1:31:50 PM PDT by DuncanWaring (The Lord uses the good ones; the bad ones use the Lord.)
[ Post Reply | Private Reply | To 48 | View Replies]

To: SaveFerris

lol that’s awful. They aren’t completely shielded since we can wipe them with a tape degausser. The ones not actively stored in the ADIC are kept in a huge safe.


90 posted on 04/14/2016 1:43:49 PM PDT by miliantnutcase
[ Post Reply | Private Reply | To 45 | View Replies]

To: miliantnutcase

Hopefully you’ll be OK until you carry them to the degausser.

My first company had (back a few decades) 1600 dpi and 6250 dpi tapes. They loaded up for a full disaster test in Colorado. Unfortunately, the Colorado drives would only take 6250 tapes and couldn’t read the older 1600 dpi tapes.

Oops.


91 posted on 04/14/2016 1:47:38 PM PDT by SaveFerris (Be a blessing to a stranger today for some have entertained angels unaware)
[ Post Reply | Private Reply | To 90 | View Replies]

To: Organic Panic

You’re correct. Most “deletes” from an OS perspective simply delete the directory information. The file is logically deleted, but is still physically present on the disk. The data could possibly still be recovered. It won’t be cheap, but unless something else overwrites those sectors, it can be done.


92 posted on 04/14/2016 2:01:27 PM PDT by IronJack
[ Post Reply | Private Reply | To 24 | View Replies]

To: Bubba_Leroy

93 posted on 04/14/2016 2:05:44 PM PDT by Red Badger (WE DON'T NEED NO STEENKING TAGLINES!...........................)
[ Post Reply | Private Reply | To 87 | View Replies]

To: SaveFerris

WHoopsie!


94 posted on 04/14/2016 2:14:14 PM PDT by miliantnutcase
[ Post Reply | Private Reply | To 91 | View Replies]

To: Red Badger

When I work on something very sensitive, I never work alone. I always have my supervisor look over my shoulder. I press ENTER only when we both agree that this is the right thing to do.

Similarly, when my supervisor works on something sensitive, he calls me to look over his shoulder.


95 posted on 04/14/2016 2:22:55 PM PDT by doomtrooper99 (Mr Truman, you did not finish the job)
[ Post Reply | Private Reply | To 93 | View Replies]

To: doomtrooper99

96 posted on 04/14/2016 2:28:49 PM PDT by Red Badger (WE DON'T NEED NO STEENKING TAGLINES!...........................)
[ Post Reply | Private Reply | To 95 | View Replies]

To: Red Badger
My .bash_profile contains the line:

alias rm='rm -i --preserve-root'

Might have saved him some grief.
97 posted on 04/14/2016 4:21:38 PM PDT by farming pharmer ('Your work will warm you' - overheard in a Soviet gulag...)
[ Post Reply | Private Reply | To 1 | View Replies]

To: thoughtomator
let this be a lesson: coffee first, then bash

Those who do not learn from ~/.bash_history are doomed to repeat it.

98 posted on 04/15/2016 5:28:33 AM PDT by Bloody Sam Roberts (#BlackOlivesMatter)
[ Post Reply | Private Reply | To 82 | View Replies]

To: akalinin

AHA! You found the ROOT of the problem!......................


99 posted on 04/15/2016 6:03:59 AM PDT by Red Badger (WE DON'T NEED NO STEENKING TAGLINES!...........................)
[ Post Reply | Private Reply | To 97 | View Replies]

To: Flick Lives

Wants to know? Hell she probably INVENTED IT!..........................


100 posted on 04/15/2016 6:04:29 AM PDT by Red Badger (WE DON'T NEED NO STEENKING TAGLINES!...........................)
[ Post Reply | Private Reply | To 52 | View Replies]


Navigation: use the links below to view more comments.
first previous 1-20 ... 41-6061-8081-100101 next last

Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.

Free Republic
Browse · Search
General/Chat
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson