-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUPGRADE
131 lines (99 loc) · 4.59 KB
/
UPGRADE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
Upgrade Notes
=============
This file lists necessary steps for upgrades from older server versions.
==================
RELEASE 2006-03-10
==================
This release adds a new fingerprinting system that required some changes
to the database schema. From the 3 upgrade scenarios below follow the steps
of the one matching your type of installation.
1. Instructions for a replication slave
---------------------------------------
Reproduce the following steps to prepare a replicated db for the new schema.
This should work for replication slaves that recieve their data directly from
MusicBrainz as well as for slaves of custom databases.
Quick steps:
<turn off your cron job that replicates packets>
cd /tmp
wget ftp://ftp.musicbrainz.org/pub/musicbrainz/data/puid.dat
wget ftp://ftp.musicbrainz.org/pub/musicbrainz/data/puidjoin.dat
cd <mb_server location>
cvs -z9 update -r RELEASE_20060310-BRANCH -dP
./upgrade.sh
cd admin/replication
./LoadReplicationChanges
cd -
<turn on your cron job that replicates packets>
In detail:
0. Turn off the cron job that runs your replication. Usually this is
done via:
crontab -e
< put a # before the line that runs LoadReplicationChanges >
1. Log in to your machine that hosts the replicated database.
2. Download these two files to your /tmp directory:
ftp://ftp.musicbrainz.org/pub/musicbrainz/data/puid.dat
ftp://ftp.musicbrainz.org/pub/musicbrainz/data/puidjoin.dat
3. cd to the top-level mb_server directory (the directory where the
musicbrainz server code is located)
4. Download the latest cvs source code from the RELEASE_20060310-BRANCH
branch by issuing this command:
cvs -z9 update -r RELEASE_20060310-BRANCH -dP
5. Review the update of the source code. If you have made any changes
to your local repository, you may need to inspect the download for
merge conflicts. Resolve the conflicts as necessary before proceeding
to the next step.
6. In the same directory, run the upgrade script:
./upgrade.sh
This will load the data files downloaded to /tmp and import then into
the database.
7. Run the latest batch of replication changes, to make sure all is
well:
cd admin/replication
./LoadReplicationChanges
cd -
8. Turn on the cron job that runs your replication:
crontab -e
< remove the # before the line that runs LoadReplicationChanges >
That should be it. If you have any problems post your problems
questions here. So far I've managed to upgrade three machines without a
hitch. Good luck!
Note: Our scripts hiccuped a little during the upgrade and skipped one
schema version number. We are now at version SEVEN.
2. Instruction for a non-replicated DB
--------------------------------------
If you are using a database dump from the main MusicBrainz server, you will
have to download a new dump from ftp://ftp.musicbrain.org, drop and
reinitialize your local database as described in the INSTALL file.
In short the steps are:
a) download a dump (newer than 2006-03-10) from
ftp://ftp.musicbrainz.org/pub/musicbrainz/data/fullexport/
b) stop all applications (like apache processes) that access the DB
c) dropdb <musicbrainz db name>
d) run admin/InitDB.pl with the necessary parameters
Note: We missed a small bug that prevents the 'stats' table from being
correctly imported after the upgrade of the server code. When you recognize
an error while importing this table, simply remove the 'mbdump/stats' file
from the 'mbdump-stats.tar.bz2' dump archive and repeat the steps above.
3. Upgrading a custom DB
------------------------
To upgrade a custom STANDALONE or REPLICATION MASTER database take a look
at the the 3 upgrade scripts (in 'admin/sql/updates/') which are run in
scenario 1; especially the '20060310-1.sql' which includes the necessary
SQL statements for the schema changes.
==================
RELEASE 2006-03-05
==================
There are 2 new scripts in admin/update/ that should be run after upgrades
when you want keep your old database.
a) 20060305_FixFailedModCount
A bug with the counter for moderations that failed for other reasons than
failed voting was fixed. To fix the counters in the moderator table, run
this script ones.
The server will work fine without running it, but you will see
inconsitencies in the mentioned counter.
b) 20060305_UpdateAmazonDataFromAsinAR
ASINs and cover art URLs from the amazon advanced relationship are now pushed
to the albummeta table. This only works automatically for newly created or
modified amazon ARs.
This script will update albummeta with the amazon AR data that is in the
DB already. Not running this script will result in missing cover art images.