Skip to main content

Migrating to 1.32.6

Wave 1.32.6 was released on March 6, 2026.

Mandatory steps​

Wave 1.32.6 removes SurrealDB: both the surrealdb environment and the Surreal to PostgreSQL migration tooling are gone, and 1.32.6 and later run only against PostgreSQL.

If your installation still stores data in SurrealDB, you must migrate to PostgreSQL on Wave 1.32.5 or earlier before upgrading — the migration tooling exists only in releases 1.21.0 to 1.32.5, and it is the only path that preserves your build, scan, mirror and container records.

Before you start​

  • A PostgreSQL database reachable from Wave, with the role and grants from "Create the database" for your deployment (Docker Compose, Kubernetes).
  • Redis. The migration uses it for the run lock and to record its progress.
  • A backup of your SurrealDB data.
  • The Wave CLI, to create the records used to verify the migration.

Add the configuration required by the releases you are passing through, if you have not already:

1. Create records to verify the migration​

Run these against your existing installation and keep the IDs. Also record the number of rows in each of the wave_build, wave_request, wave_scan and wave_mirror tables in SurrealDB; step 3 compares them against the same tables in PostgreSQL.

wave --conda-package bwa --wave-endpoint <WAVE_ENDPOINT>
curl <WAVE_ENDPOINT>/view/builds/<BUILD_ID>
curl <WAVE_ENDPOINT>/view/scans/<SCAN_ID>

wave -i ubuntu --wave-endpoint <WAVE_ENDPOINT>
curl <WAVE_ENDPOINT>/view/containers/<TOKEN>

wave --mirror -i ubuntu --build-repo <BUILD_REPO> --wave-endpoint <WAVE_ENDPOINT>
curl <WAVE_ENDPOINT>/view/mirrors/<MIRROR_ID>

2. Run the migration on Wave 1.32.5​

Deploy Wave 1.32.5 with surrealdb, postgres, migrate and redis all present in MICRONAUT_ENVIRONMENTS. With migrate active, Wave throws IllegalStateException: Both 'surrealdb' and 'postgres' environments must be active. on startup unless the other two are active as well.

warning

PostgreSQL becomes the primary store as soon as Wave restarts with the postgres environment active. Reads and writes go to PostgreSQL from that moment, including the build and scan pages in Seqera Platform, so records that have not been copied yet are not visible until their table finishes. Run the migration during a quiet period.

Give every replica the same environments: a replica left with only surrealdb active keeps writing to SurrealDB. Exactly one replica runs the migration, logging Data migration initiated; the others log Unable to acquire lock - await 1s before retrying and then Lock acquire timeout reached, which is expected.

Copying starts a minute or so after startup, once Data migration initiated appears, and runs the four tables in parallel. It is complete when all four of these lines appear in the logs:

INFO  i.s.w.s.p.m.DataMigrationService - All wave_request records migrated.
INFO i.s.w.s.p.m.DataMigrationService - All wave_scan records migrated.
INFO i.s.w.s.p.m.DataMigrationService - All wave_build records migrated.
INFO i.s.w.s.p.m.DataMigrationService - All wave_mirror records migrated.

Grep the logs for Error saving — it is logged in two slightly different forms, so match the prefix rather than a whole line. A record that fails for any reason other than a duplicate key is skipped, and the migration continues, which is why the row counts from step 1 matter.

Optional settings, if the migration runs too slowly or puts too much load on the databases:

wave.db.migrate.page-size
Records fetched per page. Default: 200.
wave.db.migrate.delay
Pause between pages. Default: 5s.
wave.db.migrate.iteration-delay
Pause between records. Default: 100ms.

3. Verify​

Repeat the /view/ requests from step 1 with the same IDs — all four must resolve — and compare the row counts of the four tables against the counts you recorded.

4. Complete the migration​

Remove migrate and surrealdb from MICRONAUT_ENVIRONMENTS, keep postgres and redis, and restart Wave 1.32.5. Verify once more, then upgrade to 1.32.6 or later.

Finally, remove the settings that no longer exist: the surreal.* block and any wave.db.migrate.* values.

If you need to run the migration a second time​

The migration records its progress in Redis for 30 days, and resumes from it rather than starting over. If you roll back, or recreate the PostgreSQL database between attempts, delete the migrate-surreal/v1* keys from Redis before trying again — otherwise the migration resumes from the old position and the records before it are never copied. Records that are already in PostgreSQL are skipped when they are sent again, so restarting from the beginning is safe.

If the replica running the migration is killed without shutting down cleanly, its lock is left behind — Wave releases it on a clean shutdown, and otherwise it expires after 30 days. Every replica then gives up at Lock acquire timeout reached and no records are copied. Delete the migrate-lock/v2 key from Redis and restart: the lock is acquired once at startup, so waiting does not help.