Instructions on how to update your live data feed

View: New views
3 Messages — Rating Filter:   Alert me  

Instructions on how to update your live data feed

by Robert Kaye :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...     --    http://mayhem-chaos.net



_______________________________________________
Musicbrainz-datafeed mailing list
Musicbrainz-datafeed@...
http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-datafeed

Re: Instructions on how to update your live data feed

by Nicholas J Humfrey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Rob,

I'm afraid I didn't have complete success with your instructions. It  
all went wrong when trying to update the SQL (20061104-1.sql).

I since thought I would go for a fresh install and wiped the  
database, but forgot that there hasn't been a full dump since the  
schema sequence changed. When is the next full dump scheduled for?


nick.



$ dpkg -l postgresql
ii  postgresql     7.4.7-6sarge4  object-relational SQL database  
management sy



./psql READWRITE < sql/updates/20061104-1.sql

BEGIN
NOTICE:  CREATE TABLE will create implicit sequence "label_id_seq"  
for "serial" column "label.id"
CREATE TABLE
CREATE TABLE
NOTICE:  CREATE TABLE will create implicit sequence  
"l_album_label_id_seq" for "serial" column "l_album_label.id"
CREATE TABLE
NOTICE:  CREATE TABLE will create implicit sequence  
"l_artist_label_id_seq" for "serial" column "l_artist_label.id"
CREATE TABLE
NOTICE:  CREATE TABLE will create implicit sequence  
"l_label_label_id_seq" for "serial" column "l_label_label.id"
CREATE TABLE
NOTICE:  CREATE TABLE will create implicit sequence  
"l_label_track_id_seq" for "serial" column "l_label_track.id"
CREATE TABLE
NOTICE:  CREATE TABLE will create implicit sequence  
"l_label_url_id_seq" for "serial" column "l_label_url.id"
CREATE TABLE
NOTICE:  CREATE TABLE will create implicit sequence  
"lt_album_label_id_seq" for "serial" column "lt_album_label.id"
CREATE TABLE
NOTICE:  CREATE TABLE will create implicit sequence  
"lt_artist_label_id_seq" for "serial" column "lt_artist_label.id"
CREATE TABLE
NOTICE:  CREATE TABLE will create implicit sequence  
"lt_label_label_id_seq" for "serial" column "lt_label_label.id"
CREATE TABLE
NOTICE:  CREATE TABLE will create implicit sequence  
"lt_label_track_id_seq" for "serial" column "lt_label_track.id"
CREATE TABLE
NOTICE:  CREATE TABLE will create implicit sequence  
"lt_label_url_id_seq" for "serial" column "lt_label_url.id"
CREATE TABLE
INSERT 282401600 1
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ERROR:  adding columns with defaults is not implemented
HINT:  Add the column, then use ALTER TABLE SET DEFAULT.




On 2 Apr 2007, at 01:19, Robert Kaye wrote:

> 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@...     --    http://mayhem- 
> chaos.net
>
>
>
> _______________________________________________
> Musicbrainz-datafeed mailing list
> Musicbrainz-datafeed@...
> http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-datafeed


_______________________________________________
Musicbrainz-datafeed mailing list
Musicbrainz-datafeed@...
http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-datafeed

Re: Instructions on how to update your live data feed

by Robert Kaye :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Apr 3, 2007, at 11:53 AM, Nicholas J Humfrey wrote:

> Hi Rob,
>
> I'm afraid I didn't have complete success with your instructions.  
> It all went wrong when trying to update the SQL (20061104-1.sql).
>
> I since thought I would go for a fresh install and wiped the  
> database, but forgot that there hasn't been a full dump since the  
> schema sequence changed. When is the next full dump scheduled for?

Tonight at midnight GMT.

> $ dpkg -l postgresql
> ii  postgresql     7.4.7-6sarge4  object-relational SQL database  
> management sy

That's the problem -- you should probably upgrade to Postgres 8.0 in  
order for the upgrade to work cleanly.

--

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

Robert Kaye     --     rob@...     --    http://mayhem-chaos.net



_______________________________________________
Musicbrainz-datafeed mailing list
Musicbrainz-datafeed@...
http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-datafeed