Upgrade Parsec Server

This section assumes that you deployed Parsec following the instructions from Server deployment section. If you deployed Parsec differently, you might need to adapt these instructions to your custom deployment.

Warning

Before upgrading, make sure to back up the database as explained in the Backup and Restore section in case you need to roll back the update.

In this guide, we will migrate parsec-server from version v3.0.0 to v3.1.0.

  1. Update the parsec-server docker image tag of in docker-compose file (parsec-server.docker.yaml):

1services:
2  # ...
3
4  parsec-server:
5    image: ghcr.io/scille/parsec-cloud/parsec-server:v3.0.0
6    # ...

You need to change the used tag (at line 5) to v3.1.0.

  1. List the pending migrations to be applied:

docker compose -f parsec-server.docker.yaml run parsec-server migrate --dry-run

The output should look like this:

0001_initial.sql (already applied)
0002_add_migration_table.sql (already applied)
0003_human_handle.sql (already applied)
0004_invite.sql (already applied)
0005_redacted_certificates.sql (already applied)
0006_outsider_enabled.sql (already applied)
0007_users_limit.sql (already applied)
0008_apiv1_removal.sql (already applied)
0009_add_realm_user_change_table.sql (already applied)
0010_add_pki_certificate_table.sql (already applied)
0011_add_sequester_tables.sql (already applied)
0012_add_sequester_webhook.sql (already applied)
0013_add_shamir_recovery.sql βœ”
0014_add_realm_archiving.sql βœ”

Note

This output is provided as an example. Don’t expect it to match your output.

The lines ending with already applied are migrations already present on the database whereas the one ending with βœ” are migrations to be applied.

  1. Apply the database migration:

docker compose -f parsec-server.docker.yaml run parsec-server migrate
  1. Restart the parsec-server container:

docker compose -f parsec-server.docker.yaml restart parsec-server

Downgrade Parsec Server

Warning

Rollback is currently limited in Parsec. The only possible way to rollback is to use the previous database backup. So you will lose the delta of backup vs current database.

To roll back to a previous version, let’s say we want to downgrade parsec-server from version v3.1.0 to v3.0.0.

  1. Downgrade the parsec-server’s docker image tag in the docker-compose file (parsec-server.docker.yaml). Like in Update the parsec-server tag change the tag v3.1.0 to v3.0.0.

  2. Replace the current database with the backup on the Postgres database.

  3. Restart the parsec-server container