Skip to content

Backups and Upgrades

This guide is for whoever runs the server. It says what to copy so the server can be rebuilt, how to put a copy back, and how to move to a new release. Each member’s folder is also a full copy of what is shared with them, so a lost server never means lost work, but a backup keeps accounts, history, and members too.

It depends on where the server keeps its data (Storage →):

Records in Assets in Back up
The data folder The data folder The data folder
PostgreSQL The data folder or another folder The database, the asset folder, and the secret
PostgreSQL A bucket or container The database, the bucket or container, and the secret

Always keep the session secret with the backup: the secret file in the data folder, or the value of EIDOS_SERVICE_SECRET. A server restored with a different secret signs every device out.

  1. Stop the server.
  2. Copy the data folder, secret included.
  3. Start the server again.

With Docker, the data folder is the eidos-data volume:

Terminal window
docker compose stop eidos
docker compose cp eidos:/data ./eidos-backup
docker compose start eidos

While the server is stopped, people keep working. Their changes wait on their machines and send once it is back.

Use their own tools: pg_dump or your database’s managed backups, and your bucket’s or container’s versioning or replication. To be sure the database and the assets match, stop the server while you take them.

  1. Stop the server.
  2. Put the copy back: the data folder in place of the old one, or the database and assets restored with their own tools. In a Docker volume, keep the files owned by the container’s node user.
  3. Start the server with the same secret.

Changes made on people’s machines since the copy are sent again as each app reconnects.

Back up first: there is no command to undo an upgrade.

With Docker, pin EIDOS_VERSION in .env to choose when you move, then take the new image and restart:

Terminal window
docker compose pull
docker compose up -d

From the source, take the new source, build it, and restart the server. If you serve share links, build the guest site again too (Share links →).

Terminal window
git pull
pnpm install --frozen-lockfile --filter '@eidosmd/service...'
pnpm --filter '@eidosmd/service...' build

The server brings the accounts’ tables up to date as it starts.