Upgrade
cetra follows Semantic Versioning. Before 1.0, a minor release (0.x → 0.y)
may need action; the release notes (CHANGELOG.md, and each GitHub release)
start with ### Upgrade notes when it does.
What happens on upgrade:
-
Database migrations (
meta.db,catalog.db) run automatically when the new version starts. They only go forward. -
Before migrating an existing
meta.dborcatalog.db, the server keeps a copy namedmeta.db.pre-m<N>andcatalog.db.pre-m<N>in the data directory, where<N>is the highest migration applied before the upgrade (for examplemeta.db.pre-m0012). Only the copy from the last upgrade is kept. Delete the*.pre-m*files once the upgrade is verified. Until then they are copies of your data, like a backup, and count against your backup retention (GDPR). -
Parquet files are never rewritten for an upgrade; new columns are added, old files stay readable.
-
The new version replays a WAL written by the previous one.
-
Downgrading is not supported. An older binary refuses a data directory that a newer format has written, and it changes no file before refusing. The error names what is newer:
- “meta.db has format version N”: the format marker of the metadata database;
- “meta.db has applied migration N, which this build does not have”: a metadata migration;
- “this data directory has format version N, which this build … does not read”: the directory
marker in
catalog.db; - “format N is not the M this build reads”: a WAL segment;
- “catalog.db has applied migration N, which this build does not have”: a catalog migration.
Run the newer release again, or restore the pre-upgrade backup, or the
*.pre-m*copies, and run the old binary. Deletions requested after the upgrade are not in that copy, andreapply-deletionsreads a newermeta.dbonly when its format did not change: repeat those deletions by hand after a rollback. -
A data directory written before format versions existed (any build older than the first public release) is refused with “this data directory has no format version”: create a new one.
Procedure:
- Read the release notes of every version between yours and the new one.
- Take a backup:
cetra admin backup(Backup and restore). - Replace the binary, image or chart version (below) and start it.
- Check
/readyzand the UI.
Binary
Section titled “Binary”sudo systemctl stop cetracurl -fsSL https://cetra.sh/install.sh | CETRA_INSTALL_DIR=/usr/local/bin sudo -E shsudo systemctl start cetradocker-compose
Section titled “docker-compose”Set the new version in .env (CETRA_IMAGE=ghcr.io/cetra-ai/cetra:<version>), then:
docker compose pull cetradocker compose up -dAlso replace the compose files with those of the new release when its notes say so.
Kubernetes
Section titled “Kubernetes”helm upgrade cetra oci://ghcr.io/cetra-ai/charts/cetra --version <version> -n cetra --reuse-valuesThe StatefulSet replaces its one pod: the old pod stops (up to 60 s) before the new one starts on the same volume.