Breaking changes
This release upgrades to MusicBrainz database schema 27 and search index rebuilder 3 accordingly. It requires to run commands taking down all services during the upgrade.
If your musicbrainz-docker
is earlier than v-2021-05-19
, 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.
Disk space requirements have significantly increased with recording's "first release date" table: 200 GB (or 70 without indexed search).
Upgrade instructions
Assuming your checked out version of musicbrainz-docker
is v-2021-05-19
or later, then:
-
Ensure you’ve replicated up to the most recent replication packet available with the old schema 26. If you’re not sure, run:
sudo docker-compose exec musicbrainz bash -c ./admin/replication/LoadReplicationChanges
and see what it tells you; if you’re ready to upgrade, it should say “This replication packet matches schema sequence #\27, but the database is currently at #\26.”
-
Turn off cron jobs:
admin/configure rm replication-cron sudo docker-compose up -d musicbrainz
-
If you’re using the live search indexing, stop it and disable it as follows:
sudo docker-compose stop indexer admin/configure rm live-indexing-search
-
Switch to the new code with:
git fetch --tags origin git checkout v-2022-05-17-mbdb27 sudo docker-compose build
-
If you were using the live search indexing, uninstall its triggers as follows:
sudo docker-compose up -d indexer admin/setup-amqp-triggers uninstall
-
Upgrade the database schema (it may take a while to vacuum at the end, ignore the ending message about
DB_SCHEMA_SEQUENCE
):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 up -d musicbrainz indexer sudo docker-compose exec musicbrainz upgrade-db-schema.sh
-
If you’re using the web interface or web service, run the following to build new materialized tables. These will take several additional gigabytes of spaces and be kept up-to-date automatically via triggers. For more information, see INSTALL.md.
sudo docker-compose exec musicbrainz bash -c './admin/BuildMaterializedTables --database=MAINTENANCE all'
-
If you’re using the live search indexing, install new triggers:
admin/setup-amqp-triggers install
then rebuild search indexes which takes hours
(or download pre-built search indexes); See Set up search indexes):sudo docker-compose exec indexer python -m sir reindex
and re-enable live search indexing:
admin/configure add live-indexing-search
-
Turn cron jobs back on:
admin/configure rm local-compose-musicbrainz-stopped admin/configure add replication-cron
-
Stop Redis and restart all services:
sudo docker-compose stop redis sudo docker-compose up --build -d
Solved issues
- Secure published ports in development setup
- Simplify installing/uninstalling indexer triggers
Other changes
- Upgrade MusicBrainz Server to
v-2022-05-16-schema-change
(release notes) - Upgrade search indexer rebuilder to
v3.0.1
(seev3.0.0
release notes)