fixup! docs: Add chapter on upgrading, inc. system Python upgrades [#972].
[mediagoblin.git] / docs / source / siteadmin / upgrading.rst
CommitLineData
6a547ea4
BS
1.. MediaGoblin Documentation
2
3 Written in 2020 by MediaGoblin contributors
4
5 To the extent possible under law, the author(s) have dedicated all
6 copyright and related and neighboring rights to this software to
7 the public domain worldwide. This software is distributed without
8 any warranty.
9
10 You should have received a copy of the CC0 Public Domain
11 Dedication along with this software. If not, see
12 <http://creativecommons.org/publicdomain/zero/1.0/>.
13
14======================
15 Upgrading MediaGoblin
16======================
17
18Updating to a new release of MediaGoblin
19----------------------------------------
20
21Preparation
22~~~~~~~~~~~
23
24*ALWAYS* do backups before upgrading, especially before running migrations! That
25way if something goes wrong, we can fix things!
26
27And be sure to shut down your current MediaGoblin/Celery processes before
28upgrading!
29
30
31Upgrade (already on Python 3)
32~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33
341. Update to the latest release. In your ``mediagoblin`` directory, run:
35 ``git fetch && git checkout -q v0.10.0 && git submodule update``
362. Remove your existing installation:
37 ``rm -rf bin include lib lib64 node_modules``
383. Install MediaGoblin:
39 ``./bootstrap.sh && ./configure && make``
404. Update the database:
41 ``./bin/gmg dbupdate``
425. Restart MediaGoblin
43
44
45Upgrade (upgrading to Python 3)
46~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
47
481. Refer to the "Dependences" and "Configure PostgreSQL" sections of
49 ":doc:`deploying`" to install the necessary Python 3 dependencies.
502. Update to the latest release. In your ``mediagoblin`` directory, run:
51 ``git fetch && git checkout -q stable && git submodule update``
523. Remove your existing installation:
53 ``rm -rf bin include lib lib64 node_modules``
544. Install MediaGoblin:
55 ``./bootstrap.sh && ./configure && make``
565. Update the database:
57 ``./bin/gmg dbupdate``
586. Restart MediaGoblin
59
60
61Upgrade (remaining on Python 2 - not recommended)
62~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
63
641. Update to the latest release. In your ``mediagoblin`` directory, run:
65 ``git fetch && git checkout -q stable && git submodule update``
662. Remove your existing installation:
67 ``rm -rf bin include lib lib64 node_modules``
683. Install MediaGoblin:
69 ``./bootstrap.sh && ./configure --without-python3 && make``
704. Update the database:
71 ``./bin/gmg dbupdate``
725. Restart MediaGoblin
73
74
75Updating your system Python
76---------------------------
77
78Upgrading your operating system or installing a new version of
79Python may break MediaGoblin. This typically occurs because Python virtual
80environment is referring to a copy of Python that no longer exists. To fix this:
81
821. In your ``mediagoblin`` directory, remove your existing installation:
83 ``rm -rf bin include lib lib64 node_modules``
842. Install MediaGoblin:
85 ``./bootstrap.sh && ./configure && make``
863. Update the database:
87 ``./bin/gmg dbupdate``
884. Restart MediaGoblin