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.
What to back up
Section titled “What to back up”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.
Back up a data folder
Section titled “Back up a data folder”- Stop the server.
- Copy the data folder,
secretincluded. - Start the server again.
With Docker, the data folder is the eidos-data volume:
docker compose stop eidosdocker compose cp eidos:/data ./eidos-backupdocker compose start eidosWhile the server is stopped, people keep working. Their changes wait on their machines and send once it is back.
Back up a database and a bucket
Section titled “Back up a database and a bucket”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.
Restore
Section titled “Restore”- Stop the server.
- 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
nodeuser. - Start the server with the same secret.
Changes made on people’s machines since the copy are sent again as each app reconnects.
Upgrade
Section titled “Upgrade”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:
docker compose pulldocker compose up -dFrom 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 →).
git pullpnpm install --frozen-lockfile --filter '@eidosmd/service...'pnpm --filter '@eidosmd/service...' buildThe server brings the accounts’ tables up to date as it starts.