Jump to content

Man accidentally 'deletes his entire company' with one line of bad code

Taurolyon

Marco Marsala, who runs a hosting provider with 1535 customers, accidently deleted his company with a poorly written bash script automation. He accidently inserted a "rm -rf ..." line into his code.

 

http://www.independent.co.uk/life-style/gadgets-and-tech/news/man-accidentally-deletes-his-entire-company-with-one-line-of-bad-code-a6984256.html

 

http://serverfault.com/questions/769357/recovering-from-a-rm-rf

 

Morale: Always backup.... or live dangerously.

 

UPDATE: PCWorld reports it was a hoax: http://www.pcworld.com/article/3057235/data-center-cloud/that-man-who-deleted-his-entire-company-with-a-line-of-code-it-was-a-hoax.html

Link to comment
Share on other sites

Link to post
Share on other sites

Well, he did backup but the code was badly formatted and thus applied to every single server, including the backup servers. I also wouldn't really call this news worthy as the original source is from a stack exchange site and therefore can't be verified.

[Out-of-date] Want to learn how to make your own custom Windows 10 image?

 

Desktop: AMD R9 3900X | ASUS ROG Strix X570-F | Radeon RX 5700 XT | EVGA GTX 1080 SC | 32GB Trident Z Neo 3600MHz | 1TB 970 EVO | 256GB 840 EVO | 960GB Corsair Force LE | EVGA G2 850W | Phanteks P400S

Laptop: Intel M-5Y10c | Intel HD Graphics | 8GB RAM | 250GB Micron SSD | Asus UX305FA

Server 01: Intel Xeon D 1541 | ASRock Rack D1541D4I-2L2T | 32GB Hynix ECC DDR4 | 4x8TB Western Digital HDDs | 32TB Raw 16TB Usable

Server 02: Intel i7 7700K | Gigabye Z170N Gaming5 | 16GB Trident Z 3200MHz

Link to comment
Share on other sites

Link to post
Share on other sites

Did he try system restore?

Intel Xeon E5 1650 v3 @ 3.5GHz 6C:12T / CM212 Evo / Asus X99 Deluxe / 16GB (4x4GB) DDR4 3000 Trident-Z / Samsung 850 Pro 256GB / Intel 335 240GB / WD Red 2 & 3TB / Antec 850w / RTX 2070 / Win10 Pro x64

HP Envy X360 15: Intel Core i5 8250U @ 1.6GHz 4C:8T / 8GB DDR4 / Intel UHD620 + Nvidia GeForce MX150 4GB / Intel 120GB SSD / Win10 Pro x64

 

HP Envy x360 BP series Intel 8th gen

AMD ThreadRipper 2!

5820K & 6800K 3-way SLI mobo support list

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, PCBjon said:

I can just imagine the amount of swearing and shouting that he done.

Ultimate nerd-rage?

Ketchup is better than mustard.

GUI is better than Command Line Interface.

Dubs are better than subs

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, NumLock21 said:

Did he try system restore?

Kappa

[Out-of-date] Want to learn how to make your own custom Windows 10 image?

 

Desktop: AMD R9 3900X | ASUS ROG Strix X570-F | Radeon RX 5700 XT | EVGA GTX 1080 SC | 32GB Trident Z Neo 3600MHz | 1TB 970 EVO | 256GB 840 EVO | 960GB Corsair Force LE | EVGA G2 850W | Phanteks P400S

Laptop: Intel M-5Y10c | Intel HD Graphics | 8GB RAM | 250GB Micron SSD | Asus UX305FA

Server 01: Intel Xeon D 1541 | ASRock Rack D1541D4I-2L2T | 32GB Hynix ECC DDR4 | 4x8TB Western Digital HDDs | 32TB Raw 16TB Usable

Server 02: Intel i7 7700K | Gigabye Z170N Gaming5 | 16GB Trident Z 3200MHz

Link to comment
Share on other sites

Link to post
Share on other sites

recuva? :S

-sigh- feeling like I'm being too negative lately

Link to comment
Share on other sites

Link to post
Share on other sites

aPv4weq_460s_v1.jpg

Archangel (Desktop) CPU: i5 4590 GPU:Asus R9 280  3GB RAM:HyperX Beast 2x4GBPSU:SeaSonic S12G 750W Mobo:GA-H97m-HD3 Case:CM Silencio 650 Storage:1 TB WD Red
Celestial (Laptop 1) CPU:i7 4720HQ GPU:GTX 860M 4GB RAM:2x4GB SK Hynix DDR3Storage: 250GB 850 EVO Model:Lenovo Y50-70
Seraph (Laptop 2) CPU:i7 6700HQ GPU:GTX 970M 3GB RAM:2x8GB DDR4Storage: 256GB Samsung 951 + 1TB Toshiba HDD Model:Asus GL502VT

Windows 10 is now MSX! - http://linustechtips.com/main/topic/440190-can-we-start-calling-windows-10/page-6

Link to comment
Share on other sites

Link to post
Share on other sites

The community offered him some well founded advice. He should be able to recover his data, after much work and more time. This whole thing makes me empathetically nauseous.

Link to comment
Share on other sites

Link to post
Share on other sites

Not sure what OS he's using, but they need to learn a thing or two with Vista's UAC. It won't even let you delete anything. Until it ask you "are you sure" a million times before doing it.

Intel Xeon E5 1650 v3 @ 3.5GHz 6C:12T / CM212 Evo / Asus X99 Deluxe / 16GB (4x4GB) DDR4 3000 Trident-Z / Samsung 850 Pro 256GB / Intel 335 240GB / WD Red 2 & 3TB / Antec 850w / RTX 2070 / Win10 Pro x64

HP Envy X360 15: Intel Core i5 8250U @ 1.6GHz 4C:8T / 8GB DDR4 / Intel UHD620 + Nvidia GeForce MX150 4GB / Intel 120GB SSD / Win10 Pro x64

 

HP Envy x360 BP series Intel 8th gen

AMD ThreadRipper 2!

5820K & 6800K 3-way SLI mobo support list

 

Link to comment
Share on other sites

Link to post
Share on other sites

reading comments on serverfault.com, it looks like he recovered almost all the data (as he stated) 4 hours ago. looks like he will live a little longer

Computer Case: NZXT S340 || CPU: AMD Ryzen 5 1600 || Cooler: CM Hyper212 Evo || MoBo: MSI B350 Mortar || RAM Vengeance LPX 2x8GB 3200MHz || PSU: Corsair CX600 || SSD: HyperX Fury 120GB & 240GB || HDD: WD Blue 1TB + 1TB 2.5'' backup drive || GPU: Sapphire Nitro+ RX 580 4GB

Laptop 1 HP x360 13-u113nl

Laptop Lenovo z50-75 with AMD FX-7500 || OS: Windows 10 / Ubuntu 17.04

DSLR Nikon D5300 w/ 18-105mm lens

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, NumLock21 said:

Not sure what OS he's using, but they need to learn a thing or two with Vista's UAC. It won't even let you delete anything. Until it ask you "are you sure" a million times before doing it.

CentOS 7, likely logged in as root. The -rf tag is basically delete this and don't ask if I'm sure just do it.

[Out-of-date] Want to learn how to make your own custom Windows 10 image?

 

Desktop: AMD R9 3900X | ASUS ROG Strix X570-F | Radeon RX 5700 XT | EVGA GTX 1080 SC | 32GB Trident Z Neo 3600MHz | 1TB 970 EVO | 256GB 840 EVO | 960GB Corsair Force LE | EVGA G2 850W | Phanteks P400S

Laptop: Intel M-5Y10c | Intel HD Graphics | 8GB RAM | 250GB Micron SSD | Asus UX305FA

Server 01: Intel Xeon D 1541 | ASRock Rack D1541D4I-2L2T | 32GB Hynix ECC DDR4 | 4x8TB Western Digital HDDs | 32TB Raw 16TB Usable

Server 02: Intel i7 7700K | Gigabye Z170N Gaming5 | 16GB Trident Z 3200MHz

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, NumLock21 said:

Not sure what OS he's using, but they need to learn a thing or two with Vista's UAC. It won't even let you delete anything. Until it ask you "are you sure" a million times before doing it.

Also because Linux handles deletions differently from Windows, it is much more difficult to recover data. Windows just marks data as no longer needed and safe to write over. Linux is a bit different but doesn't quite delete the data entirely.

[Out-of-date] Want to learn how to make your own custom Windows 10 image?

 

Desktop: AMD R9 3900X | ASUS ROG Strix X570-F | Radeon RX 5700 XT | EVGA GTX 1080 SC | 32GB Trident Z Neo 3600MHz | 1TB 970 EVO | 256GB 840 EVO | 960GB Corsair Force LE | EVGA G2 850W | Phanteks P400S

Laptop: Intel M-5Y10c | Intel HD Graphics | 8GB RAM | 250GB Micron SSD | Asus UX305FA

Server 01: Intel Xeon D 1541 | ASRock Rack D1541D4I-2L2T | 32GB Hynix ECC DDR4 | 4x8TB Western Digital HDDs | 32TB Raw 16TB Usable

Server 02: Intel i7 7700K | Gigabye Z170N Gaming5 | 16GB Trident Z 3200MHz

Link to comment
Share on other sites

Link to post
Share on other sites

From the StackExchange/ServerFault site, it was posted under the CentOS Linux.

 

If as root, it would do so without any preventative permissions.

 

Also this -rf means "recursive" (anything under that folder) and "force" (without yes/no confirmation)

Link to comment
Share on other sites

Link to post
Share on other sites

I was going to post rm - rf as a comment to be funny but he actually used rm - rf to did this.  

 

LAWL xD

Laughing asides though i don't wish this on anyone. 

this is one of the greatest thing that has happened to me recently, and it happened on this forum, those involved have my eternal gratitude http://linustechtips.com/main/topic/198850-update-alex-got-his-moto-g2-lets-get-a-moto-g-for-alexgoeshigh-unofficial/ :')

i use to have the second best link in the world here, but it died ;_; its a 404 now but it will always be here

 

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, PCBjon said:

I can just imagine the amount of swearing and shouting that he done.

Guaranteed he didn't swear. Mistakes that you swear about are small ones.

 

When he saw what happened he probably went dead quiet, jaw slack, might have puked a bit, probably cried.

- Silverstone TJ08B-E - Gigabyte Z87M-D3H - i7 4770k @ 4.0GHZ 1.2v - 16gb Kingston HyperX Black 1600 - Gigabyte GTX 770 OC 4GB -


- Silverstone Fortress FT02 - MSI Z77 Mpower - i5 3570k @ 4.0GHZ 1.09v - 8gb Mushkin Blackline 1600 - MSI GTX 670 PE -


- Lenovo T430 (1600x900) - i5 3210m - 8GB DDR3 1333 - nVidia NVS5400M - 256GB mSATA OS - 320GB HDD-

Link to comment
Share on other sites

Link to post
Share on other sites

He wishes it's only a April fools joke that's two weeks late.

ROG X570-F Strix AMD R9 5900X | EK Elite 360 | EVGA 3080 FTW3 Ultra | G.Skill Trident Z Neo 64gb | Samsung 980 PRO 
ROG Strix XG349C Corsair 4000 | Bose C5 | ROG Swift PG279Q

Logitech G810 Orion Sennheiser HD 518 |  Logitech 502 Hero

 

Link to comment
Share on other sites

Link to post
Share on other sites

As a person launching their own hosting company soon

giphy.gif

Thats that. If you need to get in touch chances are you can find someone that knows me that can get in touch.

Link to comment
Share on other sites

Link to post
Share on other sites

Isn't this why you set an alias, so that you can't accidentally rm -rf everything?

 

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

 

Couldn't he have

LET foo = "dontDeleteAnything"

LET bar = "noReallyIMeanIt"

 

so that they don't start with a null value?

Intel i7 5820K (4.5 GHz) | MSI X99A MPower | 32 GB Kingston HyperX Fury 2666MHz | Asus RoG STRIX GTX 1080ti OC | Samsung 951 m.2 nVME 512GB | Crucial MX200 1000GB | Western Digital Caviar Black 2000GB | Noctua NH-D15 | Fractal Define R5 | Seasonic 860 Platinum | Logitech G910 | Sennheiser 599 | Blue Yeti | Logitech G502

 

Nikon D500 | Nikon 300mm f/4 PF  | Nikon 200-500 f/5.6 | Nikon 50mm f/1.8 | Tamron 70-210 f/4 VCII | Sigma 10-20 f/3.5 | Nikon 17-55 f/2.8 | Tamron 90mm F2.8 SP Di VC USD Macro | Neewer 750II

Link to comment
Share on other sites

Link to post
Share on other sites

They did that on Toy Story - deleted the production copy. Apparently a staff member took a copy home to show their kid though.

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, Taurolyon said:

Marco Marsala, who runs a hosting provider with 1535 customers, accidently deleted his company with a poorly written bash script automation. He accidently inserted a "rm -rf ..." line into his code.

 

http://www.independent.co.uk/life-style/gadgets-and-tech/news/man-accidentally-deletes-his-entire-company-with-one-line-of-bad-code-a6984256.html

 

http://serverfault.com/questions/769357/recovering-from-a-rm-rf

 

Morale: Always backup.... or live dangerously.

:o

COMMUNITY STANDARDS   |   TECH NEWS POSTING GUIDELINES   |   FORUM STAFF

LTT Folding Users Tips, Tricks and FAQ   |   F@H & BOINC Badge Request   |   F@H Contribution    My Rig   |   Project Steamroller

I am a Moderator, but I am fallible. Discuss or debate with me as you will but please do not argue with me as that will get us nowhere.

 

Spoiler

  

 

Character is like a Tree and Reputation like its Shadow. The Shadow is what we think of it; The Tree is the Real thing.  ~ Abraham Lincoln

Reputation is a Lifetime to create but seconds to destroy.

You have enemies? Good. That means you've stood up for something, sometime in your life.  ~ Winston Churchill

Docendo discimus - "to teach is to learn"

 

 CHRISTIAN MEMBER 

 

 
 
 
 
 
 

 

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, Taurolyon said:

Marco Marsala, who runs a hosting provider with 1535 customers, accidently deleted his company with a poorly written bash script automation. He accidently inserted a "rm -rf ..." line into his code.

 

http://www.independent.co.uk/life-style/gadgets-and-tech/news/man-accidentally-deletes-his-entire-company-with-one-line-of-bad-code-a6984256.html

 

http://serverfault.com/questions/769357/recovering-from-a-rm-rf

 

Morale: Always backup.... or live dangerously.

Meh, he was going to get crypto'd anyways looks like his dev/primary account had global write access. It's his own fault really. you shouldn't need admin/sudo access to do 95% of your day job.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×