Skip to content

Upgrade and backups

github-actions[bot] edited this page Nov 9, 2026 · 10 revisions

English · Español

Upgrade and backups

Upgrading with update.sh

Every release attaches an update script that backs up, updates and checks in one step. Download it once into the folder that holds your docker-compose.yml and .env:

cd mimirsynth
curl -fsSLO https://github.com/MimirSynth/mimirsynth/releases/latest/download/update.sh && chmod +x update.sh

If you installed with the installer, update.sh is already in the installation folder. Running the installer again finds the installation, changes nothing and offers to run update.sh (on Linux); install.sh --upgrade runs it without asking. Either way the installer first brings that update.sh up to date.

Command What it does
./update.sh Updates to the latest stable release. It never goes down to it: on a newer version, such as a release candidate, it says so and changes nothing
./update.sh --check Only reports what is running, what is configured, what the latest release is and what ./update.sh would do. Changes nothing
./update.sh --version 0.8.0 Updates (or goes) to a specific version; release candidates such as 0.8.0-rc.1 work too. An older version is refused when its application does not know the database's revision
./update.sh --rollback Goes back to the version of the last backup. Add --with-db to restore the database too

Release candidates. Versions compare as SemVer: 0.15.0 is newer than 0.15.0-rc.2, which is newer than 0.15.0-rc.1, which is newer than 0.14.0. On a candidate, ./update.sh moves to the final release once it is out, and until then it changes nothing; when a newer candidate of the same version is out, it names it (./update.sh --version 0.15.0-rc.2). The installer (install.sh --upgrade) follows the same rule.

Going down. An older application does not start on a database migrated by a newer one. So ./update.sh --version with an older version first checks, with the image it has just pulled, that the older application knows the database's revision; if it does not, it stops before changing anything. To go back to an older version, restore the database of that version too: ./update.sh --rollback --with-db, when the backup is of the version you want. --force goes down without the check.

It updates itself first. Before deciding anything, it compares itself with the update.sh of the release it goes to (for --check, the latest one). When they differ it replaces itself with that one, after checking it against the release's SHA256SUMS, and runs again with the same options. It never takes an older release's update.sh (going down with --version keeps the current one), and when the download or the checksum fails it carries on as it is and says so; --no-self-update keeps yours. Running the installer again also gives an existing installation the update.sh of the installer's release, checked the same way and never an older one.

An update runs in this order:

  1. Download. It pulls the new image first, so a wrong version or no network stops everything before touching anything, and the existing backup stays intact.
  2. Backup into ./backup: PostgreSQL, the documents volume, the bundled FalkorDB (when its container exists in that folder), your docker-compose.yml and your .env. Only one backup is kept: the previous one is replaced only once the new one has been written and checked, so backups never pile up. If the application is not answering when the update starts (after a failed update, for example), that backup does not replace the previous one: it goes beside it as ./backup.failed-DATE (only the newest of those is kept), and ./backup stays the backup of the last working instance, the one --rollback uses.
  3. Update. It pins MIMIRSYNTH_VERSION in .env and recreates only the application, and the OCR service when its container exists in that folder; database migrations run on start. It adopts the release's docker-compose.yml only if yours is the unmodified one of the version you were running; otherwise it keeps yours and tells you.
  4. Check. It waits until the application answers with the new version and is healthy, shows the database revision and warns if the log has errors in the last minutes. If it does not verify, it tells you how to go back.

Other options: --update-compose always adopts the release's compose file, --keep-compose never touches it, --no-files skips the documents volume, --backup-dir DIR saves the backup elsewhere, --yes skips the confirmation of a rollback and --force reinstalls the same version or goes down without checking the database, and --no-self-update keeps the update.sh you have. The script speaks Spanish when your LANG is Spanish.

The bundled Ollama (the ollama profile) is not updated: its image is pinned in docker-compose.yml, and update.sh never pulls or recreates it. When a release raises that version (the release notes say so) and its compose file is adopted, run docker compose up -d ollama afterwards.

If your .env says MIMIRSYNTH_VERSION=latest, the script cannot tell which compose file you started from, so it keeps yours: compare it with the release's and use --update-compose if you have not changed it. If you keep your own compose file, check the release notes for lines to add by hand (for example, since 0.8.0 the mimirsynth service needs extra_hosts: ["host.docker.internal:host-gateway"] to reach Ollama on a Linux host).

On macOS and Windows

update.sh runs on Linux: it needs GNU tools (flock, GNU sed and stat). On Windows, run it from WSL in the installation folder. On macOS, back up and upgrade without the script; the installer says so when it finds an existing installation.

Going back

./update.sh --rollback puts back the docker-compose.yml and .env of the backup (so the previous image version) and checks that it answers. The files of the failed version are kept as *.rolledback. With --with-db it also restores the database from the backup: anything written since the backup is lost. It only goes back to a backup of a working instance: one whose INFO has no version (made while the application was not answering, by an older update.sh) is refused before anything changes. The documents volume and FalkorDB are not restored automatically: their copies are in ./backup if you need them (see Restoring).

Without the script

Take a backup (below) and then:

docker compose pull
docker compose --profile bundled up -d

Profiles. An installation made by the installer lists its profiles in COMPOSE_PROFILES in .env, so a plain docker compose up -d starts the same services and the --profile flags on this page are not needed. Without it, name each profile you use: --profile bundled for the bundled FalkorDB, --profile ocr, --profile ollama (Compose profiles).

Check it is still healthy: docker compose ps and curl -s http://localhost:8000/api/health. Read the releases first in case one needs a manual step.

What to save

Three things, which must be consistent with each other (take them at the same moment); update.sh saves all of them except an external FalkorDB:

What Contains How
PostgreSQL users, brains, members, proposals, audit log, settings, alerts, text and document indexes docker compose exec -T postgres pg_dump -U mimirsynth mimirsynth > mimirsynth.sql
docstore volume originals of the uploaded documents copy of the volume (e.g. docker run --rm -v mimirsynth_docstore:/d -v $PWD:/b busybox tar czf /b/docstore.tgz -C /d .)
FalkorDB (graphdata) the knowledge (episodes, entities, facts) copy of the volume, or an RDB dump with redis-cli

Also save your .env, and in particular MIMIRSYNTH_SESSION_SECRET: without it the provider keys, the SMTP password, the OIDC secrets, the two-factor seeds and the notification channel secrets stored in the database cannot be decrypted (you would have to enter them again). A restore, or a copy of the database for a test stack, needs that same value.

Volume names carry the Compose project prefix (normally the folder name); see them with docker volume ls.

This copies the whole instance. To keep one brain apart, or to take it to another instance, see Export a brain and Import a brain.

What can be rebuilt

  • The episode text index is regenerated from the graph ("Reindex now" in Ask).
  • The document index is regenerated from the originals in the store (reindex the document).
  • It cannot be rebuilt: the graph itself, users and permissions, or uploaded files.

Restoring

  1. Install the same version (or a later one) with the same .env.
  2. Start only the database: docker compose up -d postgres.
  3. Restore the dump: docker compose exec -T postgres psql -U mimirsynth mimirsynth < mimirsynth.sql (from an update.sh backup: gunzip -c backup/mimirsynth.sql.gz | docker compose exec -T postgres psql -U mimirsynth mimirsynth).
  4. Put the docstore and graphdata volumes back (update.sh leaves them as docstore.tar.gz and falkordb-dump.rdb).
  5. Start everything: docker compose --profile bundled up -d.

With another MIMIRSYNTH_SESSION_SECRET

If the instance starts with another secret than the one that sealed the database, it still starts, but it says so:

  • in its log, one line: «MIMIRSYNTH_SESSION_SECRET does not match the one that sealed the stored secrets», with how many values cannot be read, by kind (never the values);
  • at the top of Administration, for instance administrators, a notice listing what cannot be read;
  • in /api/health, the field "secrets": "unreadable", without changing the status: restarting the container would not bring the secret back;
  • on each action that needs one of those secrets (testing an engine, sending an email, signing in with the authenticator app…), a clear error instead of an internal one. At the two-factor step a recovery code or a passkey still works.

Put the right value back in .env and restart. If it is lost, enter those secrets again (engines, SMTP, identity providers, notification channels, webhooks, document sources) and remove two-factor from the affected accounts in Administration → Users; the notice goes as soon as nothing is left unread.

Good practices

  • Automate the backup (cron or your system's scheduler) and test a restore from time to time.
  • update.sh keeps only the last backup, inside the installation folder: copy it off the server if you need history.
  • Always take a backup before upgrading, and before changing the embedding model (AI providers).

MimirSynth · Español

Start

Use

Administer

Agents

Reference


Español

Empezar: Tus primeros 15 minutos · Conceptos · Guía rápida · Instalación · Actualización y copias de seguridad · HTTPS y proxy inverso

Usar: Resumen · Diario · Hechos · Página de entidad · Conocimiento · Preguntar · Consultas de referencia · Grafo · Consulta Cypher · Propuestas · Calidad del contenido · Salud de la memoria · Curador · Hechos verificables · Vocabulario · Contradicciones · Trabajos · Mi cuenta

Administrar: Visión general de la administración · Administrar brains y miembros · Federación · Secretos · Exportar un brain · Importar un brain · Webhooks de entrada · Notificaciones · Métricas · Administrar usuarios · Seguridad y doble factor · Identidad OIDC · Correo SMTP · Proveedores de IA · Consumo de IA · Carpetas y límites · Recuerdo e ingesta · Auditoría · Referencia de ajustes · Roles y permisos

Agentes: Conectar agentes · Configuración de los plugins de agente · Integración con Claude Code · Integración con Codex · Integración con OpenCode · Integración con Hermes Agent · Integración con OpenClaw · API REST · Escribir buena memoria · Memoria documental

Referencia: Variables de entorno · Glosario · Preguntas frecuentes · Solución de problemas

Clone this wiki locally