Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

4 Answers

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)

share|improve this answer
add comment

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

share|improve this answer
    
got those. just want to make sure I dont skip something not immediately obvious (to me). Thanks! –  kswift May 18 '12 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 '12 at 20:55
add comment

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.

share|improve this answer
    
I wouldnt know whats changed since the last back up. But thanks for the confirm that there's nothing extra that might be affected. –  kswift May 18 '12 at 20:47
    
so your backup software does know what changed since the last backup? –  stew May 19 '12 at 0:51
add comment

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.

share|improve this answer
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 '12 at 10:53
    
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. –  Naai Sekar May 28 '12 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 '12 at 20:38
    
yup, .ssh folder configures only the client. My mistake. –  Naai Sekar Jun 13 '12 at 20:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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