Title says it all.
I'm going to upgrade ssh on a unfamiliar server. What would it be a good idea to backup before doing so?
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this communityAlong with normal backups I would recommend performing the upgrade within a screen it tmux window, as if there is a crash within the window you can easily open up a new shell without having to create a new shell session. I also know during a big remote update ubuntu opens a second ssh instance on a different port, to allow reconnection. A remote control system such as KVM (what HP calls iLO, Dell calls DRAC) is probably the best solution overall, as if there are any problems you can get console access, remotely mount media, perform power cycles etc. In terms of backups I don't think there is anything other than the usual (ie configuration and data files)
The configuration files and the files referenced in the configuration files.
Whatever changed since your last backup?
I don't see a reason that upgrading ssh should be different than any other routine backup. You should be backing up anything that changes on the server as a matter of routine anyway.
Make sure you have an ssh window open before the upgrade starts, don't close it until you know ssh is working again, so you can use your existing ssh session to fix things in the unlikely event that the upgrade fails and leaves ssh non-functional.
Backup user .ssh folder so that their customizations are preserved. Just before upgrading place a cron job that reverts back to the old version of ssh after one hour or any suitably long time after the upgrade gets over, so that if upgrade is screwed and you lost connection to server, you regain back the server in that time you specified in cron job. And if everything went file, remember to erase the cron job.