How import musicbrainz to postgresql on Windows?

Hi, I’m using Windows 10, postgresql 10. I want to get musicbrainz database and only database to my local. I tried install entire server according to the instructions on the github, but I got errors and it is so difficult for me to use ubuntu. I just want to try work with Musicbrainz database and don’t need entire server. Is it possible import MB db to postgresql on windows? Because at this moment I got errors ( can’t even read it

There are 2 pieces of software that you can use to replicate the database:

You should be able to build a slave from scratch using mbslave from scratch, import a full database dump and enable replication. This involves setting up a database, downloading an export from http://ftp.musicbrainz.org/pub/musicbrainz/data/fullexport/ and using mslave to import the dump file.
You can then set up a job to run every hour and import the latest replication packets.

Running a full server on windows needs 2 database extensions to be built for postgres.
It should be possible to install these but you will need to setup a compiler and build these yourself.
You cannot do a postgres base backup and restore this on a different architecture.
You can create a database dump using pg_dump and run the generated sql file on windows as long as all the required the extensions is installed.

2 Likes

Another solution: Download the VM (Virtual Machine) from here:
https://musicbrainz.org/doc/MusicBrainz_Server/Setup
You just have to import the dumped MB data and rebuild the search indexes. You will find the necessary steps on the same page.

1 Like

Thanks for answer, but did you set up mbslave? On step#4 it fails withe next error:
“psql: FATAL: password authentication failed for user “musicbrainz”
FATAL: password authentication failed for user “musicbrainz””
I didn’t set up it and can’t find where it is placed. In general musicbrainz is a great collection, but it is so difficult to setup it, I don’t understand why they didn’t provide normal sql dump.

looks like musicbrainz like to blow up the heads of the users. Why you didn’t create just sql dump, so every user can decide how to use it? I don’t need perl, I don’t need those mirrors, I don’t need virtual server, I just need an sql dump! I spent more than one month for this question. I start to learn how install it, got errors, leave it for some time, back try again and again erros. No simple solution for installing db. Why? Why it is so complicated? If anyone can give me sql dump from their database, I’ll appreciate it a lot. A lot!

Have you set a password for the musicbrainz user in postgres?
alter user musicbrainz with password ‘musicbranz’;

2 Likes

No, I didn’t , what is the default password? There is no any info about it in repo

UPD: Not actual, changed password

changing the password is a postgres problem.
I’m not sure how you have configured your database but you need to login as the postgres administrator user to set the password for the musicbrainz user.

I’m newbie in Ubuntu and it is pain for me, anyway I’m at step #6 from mbslave repo
Error:

./mbslave-import.py mbdump.tar.bz2 mbdump-derived.tar.bz2
Traceback (most recent call last):
File “./mbslave-import.py”, line 38, in
db = connect_db(config)
File “/home/user/Documents/mbslave/mbslave/init.py”, line 7, in connect_db
db = psycopg2.connect(**cfg.make_psql_args())
File “/usr/lib/python2.7/dist-packages/psycopg2/init.py”, line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
psycopg2.OperationalError: fe_sendauth: no password supplied

As I understand, it is a problem with connection and password. In repo no any password selected. How does it work for them? I set up password, added token to mbslave.conf but no success

[DATABASE]
host=127.0.0.1
port=5432
name=musicbrainz
user=musicbrainz
#password=111111

[MUSICBRAINZ]
base_url=https://metabrainz.org/api/musicbrainz/
#token=xxx

[TABLES]
ignore=
#ignore=tracklist_index

[schemas]
musicbrainz=musicbrainz
statistics=statistics
cover_art_archive=cover_art_archive
wikidocs=wikidocs
documentation=documentation
ignore=
#ignore=statistics,cover_art_archive,wikidocs,documentation

[solr]
url=http://localhost:8983/solr/musicbrainz/
index_artists=no
index_labels=no
index_places=no
index_releases=no
index_release_groups=no
index_recordings=no
index_works=no

[monitoring]
enabled=no
status_file=/tmp/mbslave-status.xml

I would just like to second the opinion that there should be a raw .sql dump. I don’t need/want all this “server” business just to get the data.

1 Like