2

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?

4 Answers 4

4

Along 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)

2

The configuration files and the files referenced in the configuration files.

2
  • got those. just want to make sure I dont skip something not immediately obvious (to me). Thanks!
    – karmet
    May 18, 2012 at 20:45
  • Propably you should backup the servers private and public keys, too - but I did not run across any ssh that touched these during an upgrade.
    – Nils
    May 18, 2012 at 20:55
2

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.

2
  • I wouldnt know whats changed since the last back up. But thanks for the confirm that there's nothing extra that might be affected.
    – karmet
    May 18, 2012 at 20:47
  • so your backup software does know what changed since the last backup?
    – stew
    May 19, 2012 at 0:51
0

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.

4
  • 1
    I think kswift is saying he wants to upgrade ssh (I assume openssh-server) so I think restoring the users .ssh file wouldn't have any effect on this, and may further complicate matters
    – Rqomey
    May 25, 2012 at 10:53
  • 1
    roomey, .ssh is not a file, it is a folder in user home directory. It might contain (depending on the user) config file among other files, which is used to configure that user specific config settings. This wont complicate anything.
    – bagavadhar
    May 28, 2012 at 6:01
  • yup sorry was a typo. I thought the .ssh folder in the users directory was to configure the client only, not the server, my apologies if thats an incorrect assumption, I just haven't seen an ssh server configured in that manner before.
    – Rqomey
    May 28, 2012 at 20:38
  • yup, .ssh folder configures only the client. My mistake.
    – bagavadhar
    Jun 13, 2012 at 20:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.