-
Fetch the latest version, but don't change any local files yet:
git fetch origin
-
Read the latest UPDATING for any special updating instructions. Some updates may require special interventions, and it is crucial that you read this file before doing anything.
git show origin/production:UPDATING
-
Stop your webserver and backup your database:
(stop webserver) ./bin/backup_osmium
-
Merge the latest version:
git merge origin/production git submodule init git submodule update
-
If UPDATING says that the
eve
schema has been updated, do the steps in the "Updating theeve
schema" section below. -
If UPDATING says that the
osmium
schema has been updated, do the steps in the "Updating theosmium
schema" section below. -
Make sure that everything is in working order:
./bin/sanity_check
-
Clear cache:
make clear-harmless-cache
-
Start your webserver and test the changes. You may want to only allow your IP address to access the server during that period.
-
Backup the
osmium
schema (bin/backup_osmium
). -
Drop the two schemas:
DROP SCHEMA osmium CASCADE; DROP SCHEMA eve CASCADE;
-
Redo step 1 and 2 of the initial database setup section (see
README-Install.md
). -
Restore the
osmium
schema.pg_restore -j 8 -d osmium -U osmium_user pgsql/osmium-full-XXXXX.pgsql
-
Wipe all Sphinx indexes and redo the initial Sphinx setup (see
README-Install.md
).
-
Backup the
osmium
schema (bin/backup_osmium
). This step isn't strictly necessary, but it will allow you to restore a working data set if the database patches fail. -
Apply all the database patches for the version you are upgrading from (if you skipped multiple versions, use all patches in versions greater or equal than the version you are upgrading from):
cat pgsql/patches/<previous_version>/*.sql | psql osmium osmium_user
-
Wipe all Sphinx indexes and redo the initial Sphinx setup (see
README-Install.md
).