Replication / schema mismatch


#1

My Musicbrainz server was months behind in replicating, so i decided to download the latest mbdump

I’ve dropped the table and re-imported it all, however now the slave.sh script fails with
Schema sequence mismatch, codebase is 23, database is 1

is there way to fix this? or did the database re-load not work properly.

on a side note has anyone been able to get the replication slave script to update album art / recently added so on the front page the thumbnails update along with all the other data? as well?


#2

Edit data is not replicated, so that’s not possible.


#3

That does sound really strange. I wouldn’t have raised an eyebrow about a codebase = 22, database = 23 situation; but database = 1?

What did you do to import the new database?


#4

poor choice of words… replicate the data… not update… so when the replication occurs that “recently added” album art info is dragged down to server as well.


#5

i ran the import script as per the build guide. i am guessing something went wrong… i would have expected may be 22/23 error as that seems to be fairly common, if you do an update just after the schema changed…

my DBDefs.pm file refers to schema 23, so looks ok.

after dropping the old database i recreated it - ./admin/InitDb.pl --createdb --clean
then ran import script
./admin/InitDb.pl --createdb --import /tmp/dumps/mbdump*.tar.bz2 --echo (path was different to where i saved the bz2 files)

i used the mbdumps from the 10th of december

the server does work, but the replication script fails.


#6

As I said before: not possible.


#7

Ah, that is probably the problem, then. You should only have run the other command.

Are you sure your server is working and all your data is complete? I would expect at least the artist and label data to be missing.

The easiest way forward would be to drop the database again and do a reimport, but this time without running the --createdb --clean first.


#8

ok cool… will try that. thank … if i couldn’t figure it out i was considering starting for scratch again :stuck_out_tongue:


#9

that worked, but had to include createdb - must have dropped the entire table when i dropped it (whoops!)

took about a week to import all hte data gain, but have caught up now using the slave.sh… just need to figure out why it fails when run by cron - but works fine when run from command line (it throws scrips errors in slave.log file


#10

When cron runs a script, it doesn’t do it in a shell, so .bashrc isn’t included. You need to set up the local::lib environment yourself.