Breaking changes
This release upgrades the MusicBrainz database schema version to 30. It requires to run commands taking down all services during the upgrade.
Disk space requirement has been readjusted: 350 GB (or 100 GB without indexed search), system included.
If your musicbrainz-docker
is earlier than v-2024-05-13-mbdb29-pg16
, you must first update to it (see its release notes) and follow the upgrade instructions below, or remove everything using sudo docker-compose down --rmi local --volumes
and reinstall.
Upgrade instructions
Assuming your checked out version of musicbrainz-docker
is v-2024-05-13-mbdb29-pg16
or later, then:
-
Ensure you’ve replicated up to the most recent replication packet available with the old schema 29. If you’re not sure, run:
sudo docker-compose exec musicbrainz bash -c 'carton exec -- ./admin/replication/LoadReplicationChanges'
and see what it tells you; if you’re ready to upgrade, it should say “This replication packet matches schema sequence #30, but the database is currently at #29.”
-
Turn off cron jobs:
admin/configure rm replication-cron sudo docker-compose up -d musicbrainz
-
Switch to the new code with:
git fetch --tags origin git checkout v-2025-05-23.0-mbdb30
-
Upgrade the MusicBrainz database schema:
mkdir -p local/compose/ && cp -a admin/lib/upgrade-db-schema/musicbrainz-stopped.yml local/compose/ admin/configure add local-compose-musicbrainz-stopped sudo docker-compose build musicbrainz sudo docker-compose up -d musicbrainz sudo docker-compose exec musicbrainz upgrade-db-schema.sh
The rest of this step took ~12min with 4GB of shared buffers during tests.
At the end it should say “Done” followed with a message that you can safely ignore as handled already: “UPDATE THE DB_SCHEMA_SEQUENCE IN DBDefs.pm TO 30 !”Troubleshooting
The following lines are expected and can be safely ignored:
NOTICE: trigger "…" for relation "…" does not exist, skipping
-
This is an optional step. If you had previously built materialized tables, a few of them have to be rebuilt:
sudo docker-compose exec musicbrainz bash -c 'carton exec -- ./admin/BuildMaterializedTables --database=MAINTENANCE recording_first_release_date artist_release artist_release_group'
-
Load the first replication packet available with the new schema 30:
sudo docker-compose exec musicbrainz bash -c 'carton exec -- ./admin/replication/LoadReplicationChanges --limit=1'
and see what it tells you; if the upgrade, it should say “This packet was produced (or begins) at 2025-05-19 18:59:03.681755+00”
Troubleshooting
The following lines are expected and can be safely ignored (for the first packet only):
The current row in musicbrainz.replication_control with key id='1' contains a different value in column current_schema_sequence (30) than the replication packet suggests it should have as the old value (29). at /musicbrainz-server/admin/replication/ProcessReplicationChanges line 497. WARNING: amqp could not commit tx mode on broker 1, reply_type=2, library_errno=4
-
Turn cron jobs back on:
admin/configure rm local-compose-musicbrainz-stopped admin/configure add replication-cron
-
Restart all services:
sudo docker-compose up -d musicbrainz
Changes
- Upgrade MusicBrainz Server to
v-2024-05-23.0-schema-change
(release notes) - Now fetch the event-art-archive dump too
P.S. Search upgrades will occur in a separate release.