I’m trying to deploy the MusicBrainz database on a Google Cloud so that I do not have to use the API. For some reason whenever I put put the dump on Google Cloud, it gives me a random error.
These are the steps I have taken so far:
- Follow the instructions on mbslave . https://github.com/lalinsky/mbslave
- Make the data dump from postgresql, and compress it by gzip. Use the command line on Google website.
pg_dump -U [USERNAME] --format=plain --no-owner --no-acl [DATABASE_NAME] \ | sed -E 's/(DROP|CREATE|COMMENT ON) EXTENSION/-- \1 EXTENSION/g' > [SQL_FILE].sql
- Make the Google bucket to upload the data dump
- Upload the compressed data dump to the bucket
- Import it
Specific Error: The specific error is “Unknown Error”, but the Google logs show the following:
- ERROR: syntax error at or near “AS” at character 55
- STATEMENT: CREATE SEQUENCE cover_art_archive.art_type_id_seq
- AS integer
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
I’ve tried to import it as a regular .sql dump as well as trying to compress it as a .gz to no avail.
I have been stuck on this for a couple of weeks now, and would really appreciate some guidance on this problem.