This guide assumes that you are familiar and comfortable with administration of a
Cyrus installation, and system administration in general.
It assumes you are intalling from source or tarball. If you want to install from package,
use the upgrade instructions from the package provider.
.. contents:: Upgrading: an overview
:local:
1. Preparation
--------------
Things to consider **before** you begin:
Installation from tarball
#########################
You will need to install from our packaged tarball. We provide a full list of libraries that Debian requires, but we aren't able to test all platforms: you may find you need to install additional or different libraries to support v3.0.
How are you planning on upgrading?
##################################
Ideally, you will do a sandboxed test installation of 3.0 using a snapshot of your existing data before you switch off your existing installation. The rest of the instructions are assuming a sandboxed 3.0 installation.
If you're familiar with replication, and your current installation is 2.4 or newer, you can set up your existing
installation to replicate data to a new 3.0 installation and failover to the new installation when you're
ready. The replication protocol has been kept backwards compatible.
-If you are upgrading in place, you will need to shut down Cyrus entirely while you install the new package. If your
-old installation was using Berkeley DB format databases, you will need to convert or upgrade the databases **before**
-you upgrade. Cyrus v3.0 does not support Berkeley DB at all.
+If you are upgrading in place, you will need to shut down Cyrus
+entirely while you install the new package. If your old installation
+was using Berkeley DB format databases, you will need to convert or
+upgrade the databases **before** you upgrade. Cyrus v3.0 does not
+support Berkeley DB at all.
+
+Do What As Who?
+###############
+
+Since the various files, databases, directories, etc. used by Cyrus
+must be readable and writable as the ``cyrus`` user, please make sure
+to **always** perform Cyrus commands *as* the ``cyrus`` user, and not
+as ``root``. In our documentation, we will always reference Cyrus
+commands in this form -- :cyrusman:`cyr_info(8)` -- before using
+examples of them, so you'll know that those commands **must** be run as
+the ``cyrus`` user.
+
+Doing so in most systems is as simple as using either the ``su`` or
+``sudo`` commands, like so::
+
+ su cyrus -c "/usr/local/bin/cyr_info conf-lint -C /etc/imapd.conf -M /etc/cyrus.conf"
+ sudo -u cyrus /usr/local/bin/cyr_info conf-lint -C /etc/imapd.conf -M /etc/cyrus.conf
+
+In this document, however, there are also several command examples which
+*should* or **must** be run as ``root``. These are always standard \*nix
+commands, such as ``rsync`` or ``scp``.
We strongly recommend that you read this entire document before upgrading.
2. Install new 3.0 Cyrus
------------------------
Download the release :ref:`3.0 package tarball<install-diy>`.
Fetch the libraries for your platform. The full list (including all optional packages) for Debian is::
If you're on another platform and can provide the list of dependencies, please
let us know via a `GitHub issue <https://github.com/cyrusimap/cyrus-imapd/issues>`_ or documentation pull request or send mail to the :ref:`developer list<feedback>`.
Follow the :ref:`general install instructions <basicserver>`.
.. note::
It's best to ensure your new Cyrus *will not* start up automatically
if your server restarts in the middle of the upgrade.
How this is best achieved will depend upon your OS and distro, but may involve
something like ``systemctl disable cyrus-imapd`` or ``update-rc.d cyrus-imapd disable``
3. Shut down existing Cyrus
---------------------------
-Shut down your existing Cyrus installation with its init script or whatever method you normally use.
+Shut down your existing Cyrus installation with its init script or
+whatever method you normally use.
This is necessary to guarantee a clean data snapshot.
-4. Backup existing data
------------------------
+4. Backup and Copy existing data
+--------------------------------
We recommend backing up all your data before continuing.
* Sieve scripts
* Config files
* Mail spool
* :ref:`Cyrus Databases <databases>`
(You do already have a backup strategy in place, right? Once you're on 3.0, you can
consider using the new inbuilt :ref:`backup tools <cyrus-backups>`.)
+Copy all of this to the new instance, using ``rsync`` or similar tools.
+
+.. note::
+
+ Cyrus keeps its data and databases in various locations, some of
+ which may be tailored by your configuration. Please consult
+ :ref:`imap-admin-locations` for guidance on where data lives in your
+ current installation.
+
+For example, to copy from an existing Debian or Ubuntu installation
+using their standard locations, you might execute this series of
+commands on the *new* server (where "oldimap" is the name of the old