Hey everyone! I'm curious about something we've been discussing in my office regarding Linux server upgrades. We have a RedHat 9.5 server, and we're considering using `dnf upgrade` to keep things updated. I'm mainly wondering: how safe is it to run `dnf upgrade` from my laptop using things like Putty or Windows Terminal? What if my laptop crashes, or I lose connection, or even something more drastic happens like a power failure? I remember many years ago when we had to use a physical terminal to do these kinds of upgrades to avoid issues. We recently tested `dnf upgrade` on a test server. I unplugged the Ethernet cable from my laptop during the process while monitoring through a web console, and here's what I found: 1) When using Windows Terminal, the upgrade completed without issues. 2) When using Putty, the process hung up, and I had to restart it. Thankfully, nothing was corrupted. I'm just looking for some advice from anyone who's been through this—should I stick to the web console for these upgrades, or is it fine to use a terminal too? How do you guys handle this type of stuff? Thanks a lot!
5 Answers
Yup, always use `screen` or `tmux` when running upgrades or any critical commands. It’s just a smart move, trust me!
I usually just run upgrades in a `tmux` session. It’s great for handling SSH drops, which happens to me all the time. Keeps everything running smoothly even if my connection goes wonky.
You might also want to try starting `dnf-automatic` to manage your upgrades automatically without the hassle. That way, you're less likely to encounter interruptions.
Wow, I hadn’t thought of that! Diving into the docs as we speak, thanks for the tip!
Just a heads up—`dnf` is transactional, which means it can back out upgrades if something goes wrong. But if you're really worried about it, definitely detach the process so you can avoid interruptions.
Just so you know, relying on `dnf` to back out updates isn't foolproof. It depends on whether the old packages are still available, especially in some repos. Better to use `tmux` or `screen` for sure!
Definitely go with `screen` or `tmux`, or even just use good old nohup if you're in a pinch. Those tools really save you from headaches!
I need to check out `tmux` sometime! I can’t even imagine doing server maintenance without GNU Screen. When everything was physical, it was easier, but nowadays with all virtual servers? No way I’d skip it.