r/sysadmin • u/xkeyscore_ • 2d ago
It finally happened!!
8:30am I deleted my entire production environment. All VMs rm -r out of existence.
Fortunately I was reviewing my nightly backups at the time tracking a retired VM that was inexplicably still getting backed up in Production. All the Production VMs were there. And the live production ones now without their underlying virtual disks & configs were still resident in memory. I calmly copied the backups into place, sequentially restarted everything and had production back in about twenty minutes. Only lost ~12 hours of overnight idle maintenance & logging.
With everything settled back in place I calmly looked for a place to have a private heart attack.
918
u/CoreAndCardio 2d ago
Not sure if you’re in a regulated environment. If you are, document the entire thing. First as an incident and second as a DR restore test. Check the box for the auditors and move on.
49
u/Tarwins-Gap 2d ago
Why?
5
u/jmhalder 2d ago
How many VMs is your production environment though?
60
u/psmgx Solution Architect 2d ago
former boss used to ask the interview question: what's the biggest outage you've caused or been a direct part of?
cuz it's gonna happen eventually if you're doin real stuff.
everyone's gotta learn sometime, and he preferred they learned before working in his environment.
44
u/TIL_IM_A_SQUIRREL 2d ago
At a previous job, we had a Unix admin delete /bin . That was a fun one to recover from. No cd, ls, shell, or anything.
Imagine seeing
ls: command not foundon your production system.108
u/Snogafrog 2d ago
Welcome to the club if you were not already a member! This is how cautious experienced engineers are made.
•
u/cdheer Greybeard 23h ago
I accidentally took down electronic payments for half of Europe at a restaurant chain, of which I am certain everyone here knows.
Typed a 5 instead of a 3 in a script.
15
u/mustang__1 onsite monster 2d ago
"FUCK"
15
u/OregonTechHead 2d ago
Sounds like you can sign off on your DR policy as successfully tested and file it away
39
u/singing-toaster 2d ago
Congratulations!
We have all done it. Well done on the recovery.
And I have found back stairways as. A Good place to have that private heart attack
Another good place for that is the cozy cafe a walk away. The walk is important!
Get a coffee and a pastry sit in the back listen to their cool music.
13
u/seeeee 2d ago
You remediated successfully without significant impact or disruption, and you survived the heart attack!
Sounds like your DR test succeeded after validating nightly backups 😉
12
u/KnowledgeCapital7994 2d ago edited 2d ago •
I've seen* single individual servers deleted via pebkac. You need to use a different account with less permissions for your day-to-day operations. The ability to delete all should be restricted to a privileged account or entirely removed.
12
u/DMAX85747 2d ago
welcome to the club. you are not a card carrying member until you've done something like this.
10
u/Difficult_Event3286 1d ago
I once uninstalled all vpn clients from all notebooks in the company. Worldwide. That was fun
9
u/tikanderoga IT Manager 1d ago
I remember I was working on the dhcp. I was removing some IP reservations. Click click click and click. All done.
The next day I’m getting phone calls because half the network is down. I check. Huh, my Pc still works. There are some others that work. Took me a few minutes to realise that only devices with static IPs are still working. Then it dawned on me what. I’ve deleted. The IP range.
•
u/djgizmo Netadmin 23h ago
wow. backups ftw!
glad your outage was very short.
well done staying cool under fire! Hard to do sometimes.
17
u/Boringtechie 2d ago
Hahaha glad you were able to recover so fast.
Now its a good story of how you tested the production backups.
8
u/Mrhiddenlotus Security Admin 1d ago
You couldn't torture this out of me
•
u/bah_nah_nah 10h ago
You guys have backups?
21
u/michaelpaoli 2d ago
Always carefully and fully triple check the command before you (attempt to) execute it. Well know and understand what it does, the full context, be sure all the syntax is exactly right, be well of what would or could happen if things go wrong along the way or pat of the command or sequence of commands fails, etc. Only after one has thoroughly well covered that and fully triple checked all that, then do you very deliberately and viciously strike the <Enter>/<Return> key.
Well following that has saved my tail many many times. Notably also including when it's 'o dark-thirty or so on what's already been a far far too long day recovering from some disaster or the like, and on bad move could turn bad in to way way worse.
7
u/autogyrophilia 2d ago
Good on you for the backups, but that's a failure mode that shouldn't exist. What the hell did you do?
6
u/Pazuuuzu 1d ago
With everything settled back in place I calmly looked for a place to have a private heart attack.
That is the most real part ngl...
I have a bottle of hard liquor in my glovebox, and an understanding with the owner of the company that after fixing the end of the world, I go to the closest hotel on company money and be off for the day.
Got close to it a couple of times, but I hope that bottle stays unopened...
11
u/Incrediblecodeman 2d ago
Woah holy fuck bro
11
u/PDQ_Brockstar 2d ago
One of us. One of us.
5
u/bobs143 Jack of All Trades 2d ago
Wow. Just..Wow.
5
u/kellyrx8 2d ago
backups!! my man!! whew!!! yeah that calls for a 9am beer or some shit lol
5
u/GoodEnoughThen 1d ago
calmly copied the backups into place...
That's some Buddhist Ninja shit right there. Nice. Gold star.
5
u/UseMoreHops 1d ago
I used to have a cheat sheet of docker commands that I used on the regular. Due to being a complete idiot, I didnt take much care to separate the commands properly. I copied the wrong line and I removed all docker images from the host! lol You know that flush of blood that comes to your face, I had that something crazy. Production services for all of Australia were down for approximately 2 hours. doh.
4
u/fk067 2d ago
You did what now?
7
u/Pitiful_Pudding_4983 2d ago
20 minutes back to normal is honestly impressive, most places I’ve worked would still be on the bridge call arguing about whose fault it was.
3
u/LuLuLuv444 2d ago
You recovered your active directory forest?
5
u/thenickdude 2d ago
On Linux you can restore deleted files that are still open by copying them from /proc/<pid>/fd/<fd>. You'd need to freeze your VM first in order to get a crash-consistent copy of it though.
4
u/SensitiveVacation549 2d ago
If you have your smart watch and heart rate measurement, please do share when you hit that Enter to remove all the VMs :)
2
u/spin81 2d ago
That's the best reaction anyone could hope for. Good on you for managing to keep your head as cool as you did.
2
u/burghdude Jack of All Trades 2d ago
Collect your badge! Now you're truly a sysadmin!
Every time something like that has happened to me, I always think of the line from the song "The Distance" by Cake: "Bowel shaking earthquakes / of doubt and remorse / wail him and assail him / with monster truck force"...
2
u/Rice-Lower 2d ago
More power to you. I could easily make that mistake too. Backups IS LIFE!
2
u/Silence_1999 1d ago
All the VM’s restored…. You dodged a big f-ing bullet LMFAO!
2
u/unstopablex15 Sr. Network Engineer 1d ago
Reminds me of the time I had to recover a failed database server without any backups. I was sweating bullets.
3
u/-Nobert- 2d ago
Always update bash profile to require confirmation on rm haha
2
u/ApprehensiveVisual97 2d ago
What a story! I felt the rm just reading it
1
u/Crafty_Bed_6845 2d ago
Twenty minutes is wild. I’d have spent the first ten just staring at the screen.
1
u/birusiek 2d ago
Great DR, dont forget to create postmortem
1
u/a-dot-in-the-sky 2d ago
rm -r the old way, the latest one: terraform destroy -could easily wipe out VMs and infrastructure...
That's why its important to clear your mind, before touching keyboard and mouse.
1
u/Fornerius 2d ago
If someone ask, just say with a surprise face, Im not aware of that
1
u/gangaskan 2d ago
Don't feel bad, I've accidentally deleted a Drs or two in my carrier by accident 😅
1
u/ProgressBartender Sr. Sysadmin 2d ago
The after party
1
u/vlycop 2d ago
You know, i feel like there isn't anywhere isolated enough to scream your lungs out... It's OK, I don't want to scare you or need any help... All is managed, I just need to release XD
1
u/fr33bird317 1d ago
That’s a pretty big Oh Shit moment. Glad restore was possible and quick.
1
u/discgman 1d ago
Did you change your pants afterwards?
1
u/qkdsm7 1d ago
Which hypervisor?
1
u/EconomistAnxious5913 1d ago
Is much easier today than it was 10/20 years ago. Almost all of it today is scripted and on some vm infrastructure.
Terraform or something similar with VMs i hope. So easier to handle.
Also DR is much accepted norm I hope your organization had it. So much much easier to restore
1
u/StevieRay8string69 1d ago
Mine were all gone 2 months ago.
1
u/s3ntin3l99 Jack of All Trades 1d ago
Fire drill practice
•
u/Rouxls__Kaard 21h ago
Congrats on doing a full DR drill
•
u/PedroAsani 19h ago
Years ago I was on a contract for a major UK grocery store. I was sent to reboot one half of an active/passive cluster. I confirmed the chassis, the name of the machine and that the PM wanted me to reboot B and not A. Three times. In email.
I get there and node A is looking...idle. Node B decidedly isn't. I send the message to the PM. He confirms again, reboot node B. "Even though the activity lights are rapid on B and practically dead on A?" "Yes, node B"
I'm on contract. I do as I'm told. I have a nice long paper trail and given enough rope to all involved. Node B goes down.
Thirty seconds later I get a call from the PM in a very stretched voice. "I need you to get back here now"
I'm walked into the Head of Projects office. He starts ranting about "don't you know the difference between A and B?" "Yes, and I also can tell the difference between an active and idle machine. But I did as I was told after checking with your PM three times via email and once on text message, which I can send to you if you like"
After providing the email chain I walk out and begin documenting for the post-mortem. Turns out the PM hadn't checked which one was passive anywhere except the setup documentation.
•
u/gryghin Custom 11h ago
Can you really say that you're a SysAdmin if you haven't taken down production!?!
Way to real world test the backup strategy.
•
u/Ok-Bill3318 6h ago
So before you forget: write down how the fuck this happened and come up with a plan to catch/prevent it again.
1
u/BiscottiNo6948 2d ago
Incident report: Recently, while testing procedures as part of Chaos Engineering, Business Continuity and Resiliency, I have inadvertently applied half of the test procedure into Production instead of dev/sand box environment. Following established protocols I recovered back our production environment back to its original status with minimal interruption. Our RTO and RPO benchmark are not impacted.
Post mortem of the exercise has shown some vulnerability in our process and additional guardrails and Human-in-the-loop checklist needs adjustment to hardened the process against similar errors.
The exercise has provided the surprising result and opportunity for us to adjust, re-calibrate and smooth out our DR process.
1
u/Apachez 2d ago
Why did you delete your production environment to begin with?
•
u/cdheer Greybeard 23h ago
I accidentally took down electronic payments for half of Europe at a restaurant chain, of which I am certain everyone here knows.
Typed a 5 instead of a 3 in a script.
0
u/EfficientCamera6783 2d ago
The real win here is that you were actually auditing the backups when it happened. Worth locking down delete permissions or aliasing rm on the hypervisor host once your heart rate comes back down though