[mb-datafeed] Instructions on how to update your live data feed

Robert Kaye rob at eorbit.net
Mon Apr 2 00:19:09 UTC 2007


As promised, here are the instructions for upgrading your MB  
installation!

-----


Please follow these steps to upgrade your installation:

0. Make sure that all packets have been applied to current database.  
You should
    see an error like this:

      This replication packet matches schema sequence #8, but the  
database is currently at #7
      You must upgrade your database in order to apply this  
replication packet

1. Check out the new code base from subversion and place it in the  
same top level
    directory as the current codebase:

      svn co http://svn.musicbrainz.org/mb_server/branches/ 
RELEASE_20070401-BRANCH mb_server-20070401

3. Configure your new codebase and copy new config files:

      cd mb_server-20070401/cgi-bin
      cp DBDefs.pm.default DBDefs.pm
      cd ../admin
      cp startup.pl.default startup.pl

4. Edit cgi-bin/DBDefs.pm and admin/startup.pl and copy over the  
appropriate
    configuration items from the old codebase:

    a. DBDefs.pm needs DB config settings changed. Also make sure  
that REPLICATION_TYPE is
       set to RT_SLAVE. Set the WEB_SERVER and RDF_SERVER settings to  
match your old
       configuration. Then review the file to make sure nothing else  
needs changing.
       It might be useful to diff your old config file against the  
new one to make sure
       you handled everything.
    b. startup.pl should only need the use lib line changed, if at  
all. Look for TODO.

    Test your configuration by doing:

    cd <to admin dir>
    ./psql READWRITE

    That should get you to your database server shell if everything  
is configured right. \q to exit.

5. Turn off cron jobs that might affect the server update.

6. Run the following scripts to update the database:

    cd admin
    ./psql READWRITE < sql/updates/20061104-1.sql
    ./psql READWRITE < sql/updates/20061104-2.sql
    ./psql READWRITE < sql/updates/20061104-4.sql

    NOTE: Make sure you don't accidentally run the -3 script!

7. Vacuum the database

    ./psql READWRITE
    vacuum analyze;
    \q

8. Test the update by loading more replication changes:

    cd replication
    ./LoadReplicationChanges

    You should see your database catch up to the latest replication  
sequence.

9. Turn cron jobs back on.

10. You're done!

----

Please let me know if you have any questions!

--

--ruaok      Somewhere in Texas a village is *still* missing its idiot.

Robert Kaye     --     rob at eorbit.net     --    http://mayhem-chaos.net





More information about the Musicbrainz-datafeed mailing list