Upgrade an existing installation
Upgrade slopscale one minor version at a time: read the release notes, stop the server, back up the database and configuration, update, restart.
Update an existing Slopscale installation to a new version:
- Read the announcement on the GitHub releases page for the new version. It lists the changes of the release along with possible breaking changes and version-specific upgrade instructions.
- Stop Slopscale
- Create a backup of your installation
- Update Slopscale to the new version, preferably by following the same installation method.
With the apt repository, that is
sudo apt update && sudo apt install slopscale. The repository offers only the latest release, so when you are more than one minor version behind, install the versions in between from their.debon the releases page first.sudo apt-mark hold slopscalekeepsapt upgradefrom updating the server along with everything else. - Compare and update the configuration file.
- Start Slopscale
Backup
Slopscale applies database migrations during upgrades and we highly recommend to create a backup of your database before
upgrading. slopscale db backup copies the database through SQLite itself and reads the copy back before it keeps it.
The configuration directory is copied separately, because the keys and the policy file are not in the database. See
Backup and restore for restoring one, for taking one on a schedule and for PostgreSQL.
An installation that follows our official releases setup guide uses the following paths:
- Configuration file:
/etc/slopscale/config.yaml - Data directory:
/var/lib/slopscale - SQLite as database:
/var/lib/slopscale/db.sqlite
sudo -u slopscale slopscale db backup
sudo cp -aR /etc/slopscale /etc/slopscale.backup-$(date +%Y%m%d%H%M%S)The copy lands next to the database as /var/lib/slopscale/db.sqlite.backup-<timestamp>.
An installation that follows our container setup guide uses a single source volume directory that contains the configuration file, data directory and the SQLite database.
docker exec slopscale slopscale db backup
cp -aR /path/to/slopscale/config /path/to/slopscale/config.backup-$(date +%Y%m%d%H%M%S)slopscale db backup is SQLite only. Use pg_dump and follow PostgreSQL’s
Backup and Restore documentation
to create a backup of your PostgreSQL database.
pg_dump --format=custom --file=slopscale-$(date +%Y%m%d).dump --username=slopscale slopscale