-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c2db855
commit 20c1cd8
Showing
5 changed files
with
172 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
================ | ||
Server Migration | ||
================ | ||
|
||
The commands below are examples to adapt to your actual configuration | ||
(server names, database configuration). | ||
|
||
Backup settings, media files and database on the old server: | ||
|
||
:: | ||
|
||
cd Geotrek | ||
sudo -u postgres pg_dump -Fc geotrekdb > geotrekdb.backup | ||
tar cvzf data.tgz geotrekdb.backup bulkimport/parsers.py var/static/ var/media/paperclip/ var/media/upload/ var/media/templates/ etc/settings.ini geotrek/settings/custom.py | ||
|
||
Good example to know how to use pg_dump and pg_restore https://devcenter.heroku.com/articles/heroku-postgres-import-export | ||
|
||
Get and unzip Geotrek sources on the new server: | ||
|
||
:: | ||
|
||
wget https://github.com/GeotrekCE/Geotrek-admin/archive/2.0.0.zip | ||
unzip 2.0.0.zip | ||
mv Geotrek-2.0.0 Geotrek | ||
cd Geotrek | ||
|
||
Restore files on the new server: | ||
|
||
:: | ||
|
||
scp old_server:Geotrek/data.tgz . | ||
tar xvzf data.tgz | ||
|
||
Then edit `etc/settings.ini` to update host variable and `geotrek/settings/custom.py` | ||
to update IGN key. | ||
|
||
Install Geotrek on the new server: | ||
|
||
:: | ||
|
||
./install.sh | ||
|
||
Restore database on the new server: | ||
|
||
:: | ||
|
||
sudo supervisorctl stop all | ||
sudo -u postgres psql -c "drop database geotrekdb;" | ||
sudo -u postgres psql -c "create database geotrekdb owner geotrek;" | ||
sudo -u postgres pg_restore -d geotrekdb geotrekdb.backup | ||
make update | ||
sudo supervisorctl start all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
================ | ||
UPDATE TO DOCKER | ||
================ | ||
|
||
These instructions will update *Geotrek* on a dedicated server with docker for production from a previous install | ||
without docker. | ||
|
||
First you should update at least to version 2.22.0 without docker. | ||
Please folow this documentation : | ||
|
||
WARNING: | ||
|
||
Intermediate versions are required to upgrade your instance, | ||
|
||
If your version is < 2.13.1, you need to install this version. | ||
|
||
If your version is < 2.16.2, you need to install this version | ||
|
||
|
||
Server migration docker | ||
----------------------- | ||
|
||
Follow the installation : ``docs/installation-docker.rst`` | ||
Do not forget to create the server in another folder and stop postgresql : | ||
:: | ||
sudo service stop postgresql | ||
|
||
|
||
Move your different settings/datas in the new folder | ||
:: | ||
# Uploaded files | ||
cp -aR ../previous-version/var ./var | ||
|
||
# If you have advanced settings | ||
cp ../previous-version/geotrek/settings/custom.py ./var/conf/custom.py | ||
|
||
# If you have import parsers | ||
cp ../previous-version/bulkimport/parsers.py ./var/conf/parsers.py | ||
|
||
# If you have custom translations | ||
cp -aR ../previous-version/geotrek/locale/ ./var/conf/extra_locale/ | ||
|
||
# If you have custom templates (example) | ||
cp ../previous-version/geotrek/trekking/templates/trekking/trek_public_pdf.html ./var/conf/extra_templates/ | ||
|
||
Then you can run your geotrek : ```` | ||
|
||
Then you can upgrade your docker to new versions : ``docs/upgrade-docker.rst`` |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
=============== | ||
Software update | ||
=============== | ||
|
||
WARNING: | ||
|
||
Intermediate versions are required to upgrade your instance. | ||
|
||
If your version is < 2.13.1, you need to install this version. | ||
|
||
If your version is < 2.16.2, you need to install this version | ||
|
||
All versions are published on `the Github forge <https://github.com/GeotrekCE/Geotrek-admin/releases>`_. | ||
Download and extract the new version in a separate folder (**recommended**). | ||
|
||
.. code-block:: bash | ||
wget https://github.com/GeotrekCE/Geotrek-admin/archive/X.Y.Z.zip | ||
unzip X.Y.Z.zip | ||
cd Geotrek-X.Y.Z/ | ||
Before upgrading, **READ CAREFULLY** the release notes, either from the ``docs/changelog.rst`` | ||
files `or online <https://github.com/GeotrekCE/Geotrek-admin/releases>`_. | ||
|
||
Shutdown previous running version : | ||
|
||
:: | ||
|
||
# Shutdown previous version | ||
sudo supervisorctl stop all | ||
|
||
|
||
Copy your old configuration and uploaded files to your new folder. | ||
|
||
:: | ||
|
||
# Configuration files | ||
cp -aR ../previous-version/etc/ . | ||
|
||
# Uploaded files | ||
cp -aR ../previous-version/var/ . | ||
|
||
# If you have advanced settings | ||
cp ../previous-version/geotrek/settings/custom.py geotrek/settings/custom.py | ||
|
||
# If you have import parsers | ||
cp ../previous-version/bulkimport/parsers.py bulkimport/parsers.py | ||
|
||
# If you have custom translations | ||
cp -aR ../previous-version/geotrek/locale/ geotrek/ | ||
|
||
Deploy the new version : | ||
|
||
:: | ||
|
||
# Re-run install | ||
./install.sh | ||
|
||
# Empty cache | ||
sudo service memcached restart | ||
|
||
|
||
Check the version on the login page ! | ||
|
||
:note: | ||
|
||
Shutting down the current instance may not be necessary. But this allows us to | ||
keep a generic software update procedure. | ||
|
||
If you don't want to interrupt the service, skip the ``stop`` step, at your own risk. | ||
|
||
Check out the :ref:`troubleshooting page<troubleshooting-section>` for common problems. |