How to use database-dumps with the virtual machine image

Tags: #<Tag:0x00007f756bd74578> #<Tag:0x00007f756bd744b0> #<Tag:0x00007f756bd743e8>

I can’t find a working way to import the database-dumps in the vm.
Running the replication for the last ten month will take at least a week, so I hope it’s possible to import the dumps to speed things up…

Yes, it is possible.

  1. Check that the current schema sequence is 24 with:

    SELECT current_schema_sequence FROM musicbrainz.replication_control;

    (If not, set DB_SCHEMA_SEQUENCE to 24 in /musicbrainz/lib/ within the docker container musicbrainzdocker_musicbrainz_1.)

  2. Download the latest data dump (doc) into a folder shared with the VM in VirtualBox, then drop the database, and finally import the dump with InitDB (doc).


Unfortunately this doesn’t help me a bit - I still have no idea how to do it.
Everything I try is failing.

The docs are for a clean install and it seems I can’t get to use them with the docker container.

Why the heck is there a docker-container in a vm? That’s pushing the level too high for me…

There is a simpler way to do it, thanks to musicbrainz-docker:

cd musicbrainz/musicbrainz-docker/
docker-compose run --rm musicbrainz / -fetch

This is not documented in musicbrainz-vm. We can add a script for it if useful.


I tried your advice on a fresh installed vm, but still no luck…

1 Like

For some reason, the db service was not running in the VM, please try:

cd musicbrainz/musicbrainz-docker
docker-compose exec musicbrainz / -fetch

You will be prompted for the password (default: musicbrainz) of PostgreSQL user musicbrainz.

1 Like
cd musicbrainz/musicbrainz-docker

So far so good…

docker-compose exec musicbrainz / -fetch

This seems to be wrong, I guess it should be this:

docker exec musicbrainzdocker_musicbrainz_1 / -fetch

Which unfortunately leeds to this:

And there’s no prompt for any password… :confused:

By the way, this is what happened on “reset-containers”:

Maybe it helps…

It should work with docker-compose version 1.17.1 which is shipped in test VM 2018-07-10.

  1. Which VM image/version do you use?

  2. What returns

    docker-compose --version
    cd ~/musicbrainz/musicbrainz-docker
    git log --oneline HEAD^..
    git status -vv


  3. Does the file ~/musicbrainz/musicbrainz-docker/docker-compose.yml contains:

       - db


          - "5432"

    ? (among other keys)

  1. Which VM image/version do you use?

The official VM from 2017-09-07 that linked here.

So I downloaded the latest image and tried again:
Database docker container is running and listening on port 5432 - but there’s no musicbrainz container running…
So I updated /musicbrainz/musicbrainz-docker/indexer-dockerfile/Dockerfile as I read here and ran:


Now also the musicbrainz container is running.

So I tried

cd musicbrainz/musicbrainz-docker
docker-compose exec musicbrainz / -fetch

but I got only errors…

So I tried to edit /musicbrainz/musicbrainz-docker/musicbrainz-dockerfile/scripts/ as followed:

But still I get the same errors as before. I even tried another reset-containers

1 Like

Great! It seems to boil down to a VirtualBox networking/dns issue. Does resolve from the host? from the guest? (or is it only from the musicbrainz docker container?)

No, dns/network is working great - during reset-containers something is downloaded - but on docker-compose exec musicbrainz / -fetch there’s the wrong url used ( instead of

1 Like

Ok, sorry, I misread the part “same errors as before”. It looks like a TTY issue but I’m not sure.

A new beta build is available, see Updated VM available for replication/reindexation test.

  • Helper scripts have been fixed/improved.
  • Base image is more recent (that might fix the potential TTY issue).
  • It does not modify but it contains the latest database dump.
1 Like