Update the upgrade notes (#6050)

* make it clear that if you installed from a package manager, you should use
   that to upgrade

 * Document the new way of getting the server version (cf #4878)

 * Write some words about downgrading.
This commit is contained in:
Richard van der Hoff 2019-09-19 18:20:01 +01:00 committed by GitHub
parent 35ce3bda7a
commit fe349b497e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 55 additions and 28 deletions

View File

@ -2,52 +2,78 @@ Upgrading Synapse
================= =================
Before upgrading check if any special steps are required to upgrade from the Before upgrading check if any special steps are required to upgrade from the
what you currently have installed to current version of synapse. The extra what you currently have installed to current version of Synapse. The extra
instructions that may be required are listed later in this document. instructions that may be required are listed later in this document.
1. If synapse was installed in a virtualenv then activate that virtualenv before * If Synapse was installed using `prebuilt packages
upgrading. If synapse is installed in a virtualenv in ``~/synapse/env`` then <INSTALL.md#prebuilt-packages>`_, you will need to follow the normal process
run: for upgrading those packages.
* If Synapse was installed from source, then:
1. Activate the virtualenv before upgrading. For example, if Synapse is
installed in a virtualenv in ``~/synapse/env`` then run:
.. code:: bash .. code:: bash
source ~/synapse/env/bin/activate source ~/synapse/env/bin/activate
2. If synapse was installed using pip then upgrade to the latest version by 2. If Synapse was installed using pip then upgrade to the latest version by
running: running:
.. code:: bash .. code:: bash
pip install --upgrade matrix-synapse[all] pip install --upgrade matrix-synapse
# restart synapse If Synapse was installed using git then upgrade to the latest version by
synctl restart
If synapse was installed using git then upgrade to the latest version by
running: running:
.. code:: bash .. code:: bash
# Pull the latest version of the master branch.
git pull git pull
pip install --upgrade .
# Update synapse and its python dependencies. 3. Restart Synapse:
pip install --upgrade .[all]
.. code:: bash
# restart synapse
./synctl restart ./synctl restart
To check whether your update was successful, you can check the running server
To check whether your update was successful, you can check the Server header version with:
returned by the Client-Server API:
.. code:: bash .. code:: bash
# replace <host.name> with the hostname of your synapse homeserver. # you may need to replace 'localhost:8008' if synapse is not configured
# You may need to specify a port (eg, :8448) if your server is not # to listen on port 8008.
# configured on port 443.
curl -kv https://<host.name>/_matrix/client/versions 2>&1 | grep "Server:" curl http://localhost:8008/_synapse/admin/v1/server_version
Rolling back to older versions
------------------------------
Rolling back to previous releases can be difficult, due to database schema
changes between releases. Where we have been able to test the rollback process,
this will be noted below.
In general, you will need to undo any changes made during the upgrade process,
for example:
* pip:
.. code:: bash
source env/bin/activate
# replace `1.3.0` accordingly:
pip install matrix-synapse==1.3.0
* Debian:
.. code:: bash
# replace `1.3.0` and `stretch` accordingly:
wget https://packages.matrix.org/debian/pool/main/m/matrix-synapse-py3/matrix-synapse-py3_1.3.0+stretch1_amd64.deb
dpkg -i matrix-synapse-py3_1.3.0+stretch1_amd64.deb
Upgrading to v1.4.0 Upgrading to v1.4.0
=================== ===================

1
changelog.d/6050.doc Normal file
View File

@ -0,0 +1 @@
Update the upgrade notes.