-
Notifications
You must be signed in to change notification settings - Fork 383
How to Upgrade Keybox Between Minor Versions
Upgrading Keybox between versions requires a lot of care. Here are the steps to have a successful upgrade:
Use pkill etc. to happily murder the ssh keybox process first!
- If you have ZFS snapshot the filesystem! Saved my butt and ensured that I didn't lose the orignal. Otherwise create a tar backup of your entire keybox directory
tar cfz keybox.tar keyboxdirectory/
This ensures that you have created a backup of your precious configuration. Make sure you do this a directory ABOVE your root installation of keybox or you will miss things.
Once the backup is complete, be sure to refer to the github upgrade directions:
The base root of the backups is:
KeyBox-jetty/jetty/keybox/WEB-INF/classes
There are several critical files that need to be backed up in order to preserve your installation:
- KeyBoxConfig.properties - Main config file for keybox
- keybox.jckes Java keystore file unlocks the database
- the following occur under the keydb as well:
- id_rsa.pub Keybox public key for systems
- keybox.mv.db Keybox database newer version post H2 format
- keybox.h2.db older version 1 internal database may not be present on new installs
Once these have been backed up, remove the Keybox-Jetty root directory and everything under it.
cd /your/directory/containing (one level above Keybox-jetty)
rm -fr Keybox-jetty
wget https://github.com/skavanagh/KeyBox/releases/download/<Jetty version>/jetty.tar.gz
tar -xf jetty.tar.gz
cd /your/root/to/Keybox-jetty/jetty/keybox/WEB-INF/classes
cp /your/root/backup/containing/KeyboxConfig.properties .
cp /your/root/backup/containing/keybox.jckes .
cd keydb
cp /your/root/backup/containing/keybox.mv.db .
cp /your/root/backup/containing/id_rsa.pub .
To start the server perform the commands below:
cd /your/root/where/you/installed/keybox/Keybox-jetty
./startKeyBox.sh
Hopefully you don't get errors. If you have ZFS do a zfs snapshot rollback and start over!