11.8. Upgrading a CamCOPS server

This involves two steps: upgrading CamCOPS itself, then upgrading the CamCOPS server database(s).

11.8.1. Upgrade the CamCOPS software

For Debian/Ubuntu:

#!/bin/bash

export CAMCOPS_VERSION=2.3.1  # ... choose a version here
export CAMCOPS_PACKAGE_NAME=camcops-server_${CAMCOPS_VERSION}-1_all.deb
wget https://egret.psychol.cam.ac.uk/camcops/download/linux_server/${CAMCOPS_PACKAGE_NAME}  # download

sudo apt-get --yes remove camcops-server
sudo gdebi --non-interactive ${CAMCOPS_PACKAGE_NAME}

For CentOS:

#!/bin/bash

export CAMCOPS_VERSION=2.3.1  # ... choose a version here
export CAMCOPS_PACKAGE_NAME=camcops-server_${CAMCOPS_VERSION}-2.noarch.rpm
wget https://egret.psychol.cam.ac.uk/camcops/download/linux_server/${CAMCOPS_PACKAGE_NAME}  # download

sudo yum --assumeyes remove camcops-server  # remove old version
sudo yum --assumeyes --verbose --rpmverbosity=DEBUG install ${CAMCOPS_PACKAGE_NAME}  # install new version

11.8.2. Upgrade the CamCOPS database

# For example:
sudo camcops_server upgrade_db --config /etc/camcops/camcops.conf

# Notes:
# - "sudo" only so that CamCOPS can read the config file
# - Use your installation-specific config file!

For more detail, see camcops_server.