> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ovalbee.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ovalbee.com/_mcp/server.

# Move an installation

An installation keeps its data in four places: PostgreSQL (flows, runs, datasets, accounts, settings and the license), object storage (images, annotations, models and reports), Qdrant (the embedding index) and Redis (queues and caches only, which the API rebuilds). Each of them either runs inside the installation (**bundled**) or is a service you operate yourself (**external**), such as a managed database or a cloud bucket.

* Between **Docker Compose and Kubernetes**, `ovalbee upgrade --backend` moves the installation for you: it copies what is bundled and connects the new installation to what is external. See [With the CLI](#between-docker-compose-and-kubernetes-with-the-cli).
* Between a **bundled and an external service**, for example from the bundled PostgreSQL to a managed one, or from the bundled storage to an S3 bucket, you move the data yourself with the commands below. See [By hand](#between-bundled-and-managed-services-by-hand).

Make one move at a time and keep the platform version unchanged during the move. If you also need an upgrade, do it first.

## Between Docker Compose and Kubernetes with the CLI

Kubernetes runs the enterprise edition only. A Docker Compose installation that holds a paid license needs no file: the CLI reads the license from the installation. Otherwise pass `--activation FILE`.

```bash
# Docker Compose on this machine -> Kubernetes
ovalbee upgrade --backend kubernetes --url https://ovalbee.example.com \
  --kube-context prod --namespace ovalbee

# Kubernetes -> Docker Compose on this machine (add --edition community for the community images)
ovalbee upgrade --backend compose --dir /srv/ovalbee --port 30080
```

Run `ovalbee upgrade` on a terminal without options to choose the same in a few questions. `--dry-run` prints the plan and stops. The plan lists:

* what is **copied**: the bundled PostgreSQL, the bundled RustFS object storage, the Qdrant collections, the secrets and the license with the installation ID;
* what is **kept**: every external service, which the new installation is connected to as the old one was;
* the **steps**, the **warnings** (node runs that would fail, settings that are not carried over) and how to **roll back**.

### What is copied and how

|                                 | How it moves                                                                                                                                                                                                                                                                                           |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| PostgreSQL, bundled             | `pg_dump --format=custom --no-owner --no-acl` inside the old database's container, streamed into `pg_restore --single-transaction` in an empty database of the new one. The row count of every table is compared afterwards. The new server must run the same PostgreSQL major version or a newer one. |
| PostgreSQL, external            | Not copied. The new installation connects to the same server (`postgres.type: external` in the chart, `OVALBEE_POSTGRES_*` in `.env`).                                                                                                                                                                 |
| Object storage, bundled RustFS  | Every bucket is copied through the S3 API with the installation's storage keys, and object counts and sizes are compared. On Kubernetes the chart's bundled storage (`objectStorage.enabled`) is turned on with the same keys.                                                                         |
| Object storage, your own bucket | Not copied. The storage settings live in the database and move with it.                                                                                                                                                                                                                                |
| Qdrant                          | A snapshot of each collection is uploaded into the new Qdrant and the exact point counts are compared. The snapshots are removed from the old Qdrant afterwards.                                                                                                                                       |
| Secrets                         | `OVALBEE_APP_SECRET`, the Qdrant key, the seed admin password and the storage keys, between `.env` and the chart's values (`secrets.*`, `objectStorage.*`). The application secret must carry over: it decrypts every credential stored in the database.                                               |
| License                         | The license and the installation ID are rows of the database, so the license stays bound to the installation. The activation key moves between `activation/` and the `<release>-activation` Secret.                                                                                                    |
| Other settings                  | `OVALBEE_*` settings of the api (such as `OVALBEE_LICENSE_SERVER_URL` or `OVALBEE_LOG_LEVEL`) move between `.env` and `api.env`. Settings that are not OvalBee's, `api.env` entries read from a Secret and `config.settings` are not carried over; the plan names them.                                |

Three stored settings depend on where the installation runs, so the copy is adjusted to the new side: the storage providers that pointed at the bundled storage get its new address, the public URL becomes the new address when it was still the old one, and the executor moves between Docker and the Kubernetes cluster the release runs in. A model deployment does not move: start it again on the new side.

### Order, downtime and checks

The move copies first and switches after:

1. The new installation is created next to the old one with its API stopped. On Kubernetes the release is installed with `api.replicaCount: 0` and the database setup Job off; on Docker Compose only PostgreSQL, Redis, RustFS and Qdrant start.
2. The old installation's API is stopped, so nothing changes while the data is copied. **OvalBee is unavailable from this step until the switch.** Its databases keep running for the copy.
3. The data is copied and compared, and the stored settings are adjusted.
4. The new installation starts. The CLI checks with `ovalbee-admin status` and `ovalbee-admin license get` in its API that every dependency answers, no migration is pending, every stored secret still decrypts and the installation ID is the old one.
5. Only then is the old installation stopped: `docker compose stop`, or every workload scaled to zero with its replica count recorded. Nothing from the old installation is deleted.

If a step fails, the CLI starts the old installation's API again and leaves the new one as it is. Run the same command again to copy into it once more, or remove it: on Kubernetes `helm uninstall`, then delete the release's PersistentVolumeClaims and the `<release>-migration` ConfigMap; on Docker Compose `docker compose down --volumes` in the new directory, then the directory.

### Rolling back

The CLI records the new installation under the context you moved, and the old one as `<context>-previous`. To go back:

```bash
ovalbee stop
ovalbee start --context prod-previous
```

Anything done on the new installation after the switch is not in the old one. When the database is external, both installations use it, and the move changed the three settings above in it: the plan prints the SQL that puts them back; run it before you start the old installation.

## Between bundled and managed services, by hand

These moves have the same shape as the CLI's: stop everything that writes, copy, point the installation at the new service, start it and check it, and keep the old data until you are sure. Plan for the API to be down for the length of the copy.

Stop the application, keeping the data services running:

```bash
# Docker Compose, in the installation directory
docker compose stop api web cv-utils-api imgproxy labeling-tool logger traefik

# Kubernetes
kubectl --namespace ovalbee scale deployment/ovalbee-api --replicas=0
```

Let active node runs finish first, or cancel them: they fail when the API stops.

### PostgreSQL

The bundled server is PostgreSQL 18. Restore into a server of the same major version or a newer one, and dump with the bundled server's own `pg_dump`, which matches its version. `--no-owner --no-acl` leaves out the bundled database's user (`postgres` on Docker Compose, `ovalbee` on Kubernetes), so the objects belong to the user that restores them.

From the bundled server to a managed one:

```bash
# 1. Dump. Docker Compose:
docker compose exec -T postgres pg_dump -U postgres -d ovalbee --format=custom --no-owner --no-acl > ovalbee.dump
#    Kubernetes:
kubectl --namespace ovalbee exec -i ovalbee-postgres-0 -c postgres -- \
  pg_dump -U ovalbee -d ovalbee --format=custom --no-owner --no-acl > ovalbee.dump

# 2. Create an empty database owned by the user OvalBee will connect as.
psql "host=db.example.com user=admin dbname=postgres sslmode=require" \
  -c 'CREATE DATABASE ovalbee OWNER ovalbee_app'

# 3. Restore as that user, in one transaction.
PGPASSWORD=... pg_restore -h db.example.com -U ovalbee_app -d ovalbee \
  --no-owner --no-acl --single-transaction --exit-on-error ovalbee.dump
```

Without a PostgreSQL 18 client on the machine, run `pg_restore` from the image: `docker run --rm -i -e PGPASSWORD postgres:18.0-alpine pg_restore -h db.example.com ... < ovalbee.dump`.

Point the installation at it:

* Docker Compose: in `.env`, set `OVALBEE_POSTGRES_HOST`, `OVALBEE_POSTGRES_PORT`, `OVALBEE_POSTGRES_DB`, `OVALBEE_POSTGRES_USER`, `OVALBEE_POSTGRES_PASSWORD` and `OVALBEE_POSTGRES_SSL` (`disable`, `require` or `verify-full`), then `docker compose up -d`. The bundled `postgres` service keeps running unused, with the old data.
* Kubernetes: set `postgres.type: external`, `postgres.external.host`, `port`, `database`, `username`, `password` and `postgres.ssl`, then `helm upgrade` with those values. The bundled PostgreSQL is removed from the release; its PersistentVolumeClaim stays.

To move back, dump the managed database the same way (`pg_dump -h db.example.com -U ovalbee_app ...`) and restore it into the bundled one, which must be empty: on Docker Compose `docker compose exec -T postgres pg_restore -U postgres -d ovalbee --no-owner --no-acl --single-transaction --exit-on-error < ovalbee.dump` after recreating the database with `dropdb`/`createdb`, then set the `OVALBEE_POSTGRES_*` settings back to `postgres`, `5432` and the bundled user.

Check that every table arrived, on the old and the new database, and compare the two outputs:

```sql
SELECT format('SELECT %L, count(*) FROM %I.%I', table_schema || '.' || table_name, table_schema, table_name)
FROM information_schema.tables
WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog', 'information_schema')
ORDER BY 1 \gexec
```

### Object storage

The bundled storage is RustFS, an S3-compatible store. OvalBee keeps every workspace's files in one bucket, `ovalbee` unless you changed it (the **workspace storage** bucket of **Admin** → **Configuration** → **Storage**): each workspace under `workspaces/<id>/`, and account pictures under `users/<id>/`. Database rows refer to files by these keys, so copy the bucket as a whole and keep every key as it is. The new bucket may have another name. Buckets you routed to the bundled storage yourself copy the same way.

Reach the bundled storage from your machine:

```bash
# Docker Compose: publish it on localhost for the copy, in docker-compose.override.yml
#   services:
#     object-storage:
#       ports: ["127.0.0.1:9000:9000"]
docker compose up -d object-storage

# Kubernetes (objectStorage.enabled)
kubectl --namespace ovalbee port-forward service/ovalbee-object-storage 9000:9000
```

Copy with [rclone](https://rclone.org), which reads from one store and writes to another. The bundled storage's keys are `OVALBEE_STORAGE_ACCESS_KEY` and `OVALBEE_STORAGE_SECRET_KEY` in `.env`, or `objectStorage.accessKey` and `secretKey` in the chart's values:

```bash
export RCLONE_CONFIG_BUNDLED_TYPE=s3 RCLONE_CONFIG_BUNDLED_PROVIDER=Other \
  RCLONE_CONFIG_BUNDLED_ENDPOINT=http://127.0.0.1:9000 RCLONE_CONFIG_BUNDLED_FORCE_PATH_STYLE=true \
  RCLONE_CONFIG_BUNDLED_ACCESS_KEY_ID=<storage access key> RCLONE_CONFIG_BUNDLED_SECRET_ACCESS_KEY=<storage secret key>
export RCLONE_CONFIG_CLOUD_TYPE=s3 RCLONE_CONFIG_CLOUD_PROVIDER=AWS RCLONE_CONFIG_CLOUD_REGION=eu-central-1 \
  RCLONE_CONFIG_CLOUD_ACCESS_KEY_ID=... RCLONE_CONFIG_CLOUD_SECRET_ACCESS_KEY=...

rclone sync bundled:ovalbee cloud:my-ovalbee-bucket --progress
rclone check bundled:ovalbee cloud:my-ovalbee-bucket   # every file present and equal
rclone size bundled:ovalbee && rclone size cloud:my-ovalbee-bucket
```

For Google Cloud Storage use `RCLONE_CONFIG_CLOUD_TYPE=gcs`, for Azure Blob Storage `azureblob`, with their own credentials. With only the AWS CLI, copy in two steps through a local folder, since one command reaches one endpoint: `aws s3 sync s3://ovalbee ./ovalbee-files --endpoint-url http://127.0.0.1:9000`, then `aws s3 sync ./ovalbee-files s3://my-ovalbee-bucket`.

Then, in **Admin** → **Configuration** → **Storage**, change the provider the workspace storage uses (`default`) to the new store, with its endpoint, region and keys (or add a provider and select it), and set the workspace storage bucket if its name changed. On Kubernetes, if `config.settings` declares the object storage, change it there instead and run `helm upgrade`. Start the API and run `ovalbee-admin status`: `storage` must be `ok`.

Back to the bundled storage: on Docker Compose RustFS always runs; on Kubernetes set `objectStorage.enabled: true` with `objectStorage.accessKey` and `secretKey` and run `helm upgrade`. Create the bucket and copy the other way (`rclone mkdir bundled:ovalbee`, then `rclone sync cloud:my-ovalbee-bucket bundled:ovalbee`), and set the provider back to the bundled endpoint, `http://object-storage:9000` on Docker Compose or `http://<release>-object-storage:9000` on Kubernetes, with the bundled storage's keys.

### Qdrant

The Helm chart always runs its own Qdrant. A Docker Compose installation can use a Qdrant you run (`OVALBEE_QDRANT_URL`); that Qdrant must have `QDRANT__SERVICE__JWT_RBAC=true` and the same API key as `OVALBEE_QDRANT_API_KEY`, which the API signs per-collection tokens with.

Move the collections with Qdrant's snapshots, collection by collection. Reach the bundled Qdrant like the bundled storage (publish port 6333 in `docker-compose.override.yml`, or `kubectl port-forward service/ovalbee-qdrant 6333:6333`), with the key in a header:

```bash
H="api-key: $OVALBEE_QDRANT_API_KEY"
curl -fsS -H "$H" http://127.0.0.1:6333/collections                     # the collections
curl -fsS -X POST -H "$H" "http://127.0.0.1:6333/collections/clip_1/snapshots?wait=true"   # -> result.name
curl -fsS -H "$H" -o clip_1.snapshot "http://127.0.0.1:6333/collections/clip_1/snapshots/<name>"

# Into the other Qdrant: upload the file...
curl -fsS -X POST -H "api-key: $NEW_KEY" -F snapshot=@clip_1.snapshot \
  "https://qdrant.example.com/collections/clip_1/snapshots/upload?priority=snapshot&wait=true"
# ...or have it fetch the snapshot from a URL it can reach
curl -fsS -X PUT -H "api-key: $NEW_KEY" -H 'Content-Type: application/json' \
  -d '{"location": "https://files.example.com/clip_1.snapshot", "priority": "snapshot"}' \
  "https://qdrant.example.com/collections/clip_1/snapshots/recover?wait=true"
```

Compare `POST /collections/<name>/points/count` with `{"exact": true}` on both sides, then remove the snapshot from the old Qdrant with `DELETE /collections/<name>/snapshots/<name>`. Set `OVALBEE_QDRANT_URL` (and the key, if it changed) and start the API.

### Redis

Redis holds only queues, schedules and caches, which the API rebuilds when it starts: point the installation at the other Redis and nothing is lost. Docker Compose: `OVALBEE_REDIS_HOST`, `OVALBEE_REDIS_PORT`, `OVALBEE_REDIS_USER` and `OVALBEE_REDIS_PASSWORD`. Kubernetes: `redis.type: external` with `redis.external.*`.

### Finish and roll back

Start the application (`docker compose up -d`, or `helm upgrade`, or scale the API back) and check:

```bash
docker compose exec -T api ovalbee-admin status          # every dependency ok, no migration pending
docker compose exec -T api ovalbee-admin secrets check   # nothing undecryptable
docker compose exec -T api ovalbee-admin license get     # the same installation ID as before
```

On Kubernetes run the same through `kubectl --namespace ovalbee exec deployment/ovalbee-api -c api -- ovalbee-admin ...`. Until you are sure, keep the old data: the bundled volumes stay as they were, and going back is setting the old connection settings again and starting the API. Changes made after the switch exist only on the new service.

## Related pages

* [Self-hosted installation](/administration/self-hosting) — what an installation consists of and how it is configured.
* [Install on Kubernetes](/administration/kubernetes) — the Helm chart and its values.
* [OvalBee CLI](/administration/cli#upgrade) — `ovalbee upgrade` and its options.