diff --git a/admin_manual/images/upgrade-1.png b/admin_manual/images/upgrade-1.png new file mode 100644 index 000000000..1b574fa9d Binary files /dev/null and b/admin_manual/images/upgrade-1.png differ diff --git a/admin_manual/maintenance/index.rst b/admin_manual/maintenance/index.rst index 32cf70520..4f6fb4800 100644 --- a/admin_manual/maintenance/index.rst +++ b/admin_manual/maintenance/index.rst @@ -7,8 +7,8 @@ Maintenance enable_maintenance backup - update upgrade + update restore migrating diff --git a/admin_manual/maintenance/update.rst b/admin_manual/maintenance/update.rst index 79887dce4..f3354d9d5 100644 --- a/admin_manual/maintenance/update.rst +++ b/admin_manual/maintenance/update.rst @@ -1,6 +1,6 @@ -====================================== -Updating ownCloud with the Updater App -====================================== +======================================= +Upgrading ownCloud with the Updater App +======================================= The Updater app automates many of the steps of updating an ownCloud installation. You should keep your ownCloud server updated and not skip any @@ -8,8 +8,8 @@ releases. The Updater app is enabled in your ownCloud Server instance by default, which you can confirm by looking on your Apps page. The Updater App is not required, and it is recommended to use other methods for -keeping your ownCloud server up-to-date, if possible. (TODO: links to -relevant docs) It is useful for installations that do not have root access, +keeping your ownCloud server up-to-date, if possible. (See :doc:`upgrade`.) The +Updater App is useful for installations that do not have root access, such as shared hosting, and for installations with a smaller number of users and data. @@ -101,8 +101,7 @@ backups from this screen. .. figure:: ../images/updater-11.png :scale: 75 % -If the Updater app fails, then you must update manually. (TODO: link to -relevant docs) +If the Updater app fails, then you must update manually. (See :doc:`upgrade`.) Can't Login Without Updating ---------------------------- diff --git a/admin_manual/maintenance/upgrade.rst b/admin_manual/maintenance/upgrade.rst index bf27f5c11..2b9480647 100644 --- a/admin_manual/maintenance/upgrade.rst +++ b/admin_manual/maintenance/upgrade.rst @@ -2,53 +2,122 @@ Upgrading Your ownCloud Server ============================== +It is best to keep your ownCloud server upgraded regularly, and to install all +point releases and major releases without skipping any of them. Major releases +are 6.0, 7.0, and 8.0, and point releases are intermediate releases for each +major release. For example, 8.0.1 and 8.0.2 are point releases. There are +multiple ways to keep your ownCloud server upgraded: with the Updater App +(Server Edition only), with your Linux package manager, and by manually +upgrading. In this chapter we will cover using your Linux package manager, and +manually upgrading. (See :doc:`update` to learn about the Updater App.) + .. note:: Before upgrading to a new major release, always first review any third-party apps you have installed for compatibility with the new ownCloud release. Any apps that are not developed by ownCloud show a - 3rd party designation. Install unsupported apps at your own risk.Then, + 3rd party designation. Install unsupported apps at your own risk. Then, before the upgrade, they must all be disabled. After the upgrade is complete you may re-enable them. Preferred Upgrade Method ------------------------ -The best method for keeping your ownCloud server on Linux servers current is by +The best method for keeping ownCloud on Linux servers current is by configuring your system to use the `openSUSE Build Service -`_, and then stay current by using your package manager to -upgrade. You should still maintain regular backups (see :doc:`backup`), and make -a backup before every update/upgrade. +`_ (see :doc:`../installation/linux_installation`), and then +stay current by using your Linux package manager to upgrade. You should still +maintain regular backups (see :doc:`../maintenance/backup`), and make a backup +before every upgrade. -Windows server admins must use the manual upgrade procedure. +All supported Linux distributions have update notifications and automatic +updaters. When a new ownCloud release is available from the openSUSE Build +Service repository, you will see it in your normal Linux package update +notifier, or it will be applied along with any other automatic updates. You may +wish to disable automatic package updates for ownCloud if you are running +third-party apps, so that you can verify their compatibility before upgrading +to a major release. -You cannot skip major releases; for example, upgrading from 5.0 to 7.0. This is -unsupported, and you'll experience unpredictable results. It is best to install -all upgrades and updates in order. +Upgrading With Your Linux Package Manager +----------------------------------------- + +When an ownCloud upgrade is available from the openSUSE Build Service +repository, you can apply it just like any normal Linux upgrade. For example, +on Debian or Ubuntu Linux this is the standard system upgrade command:: + + $ sudo apt-get update && sudo apt-get upgrade + +Or you can upgrade just ownCloud with this command:: + + $ sudo apt-get update && sudo apt-get install owncloud + +On Fedora, CentOS, and Red Hat Linux use ``yum`` to see all available updates:: + + $ yum check-update + +You can apply all available updates with this command:: + + $ sudo yum update + +Or update only ownCloud:: + + $ sudo yum update owncloud + +Your Linux package manager only downloads the current ownCloud packages. There +is one more step, and that is to run the upgrade wizard to perform the final +steps of updating the database and turning off maintenance mode. You will see +two screens. On the first screen, click the Start Upgrade button, or optionally +run the ``occ upgrade`` command instead of clicking the button. + +.. figure:: ../images/updater-8.png + +``occ upgrade`` +is more reliable, especially on installation with large datasets and large +numbers of users because it avoids the risk of PHP timeouts. The ``occ`` command +is in your ``owncloud/`` directory. You must run it as your HTTP user. This +example is for Debian/Ubuntu:: + + $ sudo -u www-data php occ upgrade + +This example is for Fedora, CentOS, and Red Hat Linux:: + + $ sudo -u apache php occ upgrade + +See :doc:`../configuration_server/occ_command` to learn more about using the +``occ`` command, and see the **Setting Strong Directory Permissions** section +of :doc:`../installation/installation_wizard` to learn about how to find your +HTTP user. + +When the upgrade is successful you will see the following screen: + +.. figure:: ../images/updater-7.png + +If the upgrade fails, then you must try a manual upgrade. Manual Upgrade Procedure ------------------------ Start by putting your server in maintenance mode. Do this by entering your -``config.php`` file and changing ``'maintenance' => false,`` to ``'maintenance' +``owncloud/config/config.php`` file and changing ``'maintenance' => false,`` to +``'maintenance' => true,``. This prevents new logins, and logged-in users can't make any further requests. -1. Ensure that you are running the latest point release of your current major - ownCloud version. -2. Deactivate all third party applications (not core apps), and review them for - compatibility with your new ownCloud version. -3. Back up your existing ownCloud Server database, data directory, and +1. If you are upgrading to a major release, for example from 7.0.5 to + 8.0, you must review all third party applications (not core apps), for + compatibility with your new ownCloud version. Then disable all of them + before starting the upgrade. +2. Back up your existing ownCloud Server database, data directory, and ``config.php`` file. (See :doc:`backup`.) -4. Download and unpack the latest ownCloud Server version from `owncloud.org/install/ +3. Download and unpack the latest ownCloud Server release (Archive file) from + `owncloud.org/install/ `_ into an empty directory outside of your current installation. For example, if your current ownCloud is installed in ``/var/www/owncloud/`` you could create a new directory called ``/var/www/owncloud2/`` -5. Stop your web server. +4. Stop your web server. -Depending on your environment, you will be running either an Apache server or -a Windows IIS server. To stop an Apache server, refer to the following table for -specific commands to use in different Linux operating systems: +Apache 2 is the recommended server for ownCloud (see :doc:`../release_notes` +for recommended setups and supported platforms.) +-----------------------+-----------------------------------------+ | Operating System | Command (as root) | @@ -65,68 +134,32 @@ specific commands to use in different Linux operating systems: | openSUSE 12.3 and up | ``systemctl stop apache2`` | +-----------------------+-----------------------------------------+ -To stop the Windows IIS web server, you can use either the user interface (UI) -or command line method as follows: - - - +----------------------+---------------------------------------------------+ - | Method | Procedure | - | | | - +======================+===================================================+ - | User Interface (UI) | 1. Open IIS Manager and navigate to the | - | | web server node in the tree. | - | | | - | | 2. In the **Actions** pane, click **Stop**. | - +----------------------+---------------------------------------------------+ - | Command Line | 1. Open a command line window as | - | | administrator. | - | | | - | | 2. At the command prompt, type **net stop WAS** | - | | and press **ENTER**. | - | | | - | | 3. (Optional) To stop W3SVC, type **Y** and | - | | then press **ENTER**. | - +----------------------+---------------------------------------------------+ - -6. Rename or move your current ownCloud directory (named ``owncloud/`` if +5. Rename or move your current ownCloud directory (named ``owncloud/`` if installed using defaults) to another location. -7. Unpack your new tarball: +6. Unpack your new tarball:: - ``tar xjf owncloud-latest.tar.bz2`` + tar xjf owncloud-latest.tar.bz2 - In Microsoft Windows environments, you can unpack the release tarball using - WinZip or a similar tool (for example, Peazip). Always unpack server code - into an empty directory. Unpacking the server code into an existing, - populated directory is not supported and will cause all kinds of errors. - -8. This creates a new ``owncloud/`` directory populated with your new server +7. This creates a new ``owncloud/`` directory populated with your new server files. Copy this directory and its contents to the original location of your old server, for example ``/var/www/``, so that once again you have ``/var/www/owncloud`` . -9. Copy and paste the ``config.php`` file from your old version of +8. Copy and paste the ``config.php`` file from your old version of ownCloud to your new ownCloud version. -10. If you keep your ``data/`` directory in your ``owncloud/`` directory, copy - it from your old version of ownCloud to the ``owncloud/`` directory of your - new ownCloud version. If you keep it outside of ``owncloud/`` then you - don't have to do anything with it. +9. If you keep your ``data/`` directory in your ``owncloud/`` directory, copy + it from your old version of ownCloud to the ``owncloud/`` directory of + your new ownCloud version. If you keep it outside of ``owncloud/`` then + you don't have to do anything with it. .. note:: We recommend storing your ``data/`` directory in a location other than your ``owncloud/`` directory. If you have your ``data/`` directory already stored in another location, you can skip this step. If you want to do so, now is a good time to change the location of your ``data/`` directory. -11. Restart your web server. - -Depending on your environment, you will be running either an Apache server or a -Windows IIS server. In addition, when running your server in a Linux -environment, the necessary commands for stopping the Apache server might differ -from one Linux operating system to another. - -To start an Apache server, refer to the following table for specific commands -to use in different Linux operating systems: +10. Restart your web server. +-----------------------+-----------------------------------------+ | Operating System | Command (as root) | @@ -142,38 +175,16 @@ to use in different Linux operating systems: | | | | openSUSE 12.3 and up | ``systemctl start apache2`` | +-----------------------+-----------------------------------------+ - -To start the Windows IIS web server, you can use either the user interface -(UI) or command line method as follows: - - +----------------------+---------------------------------------------------+ - | Method | Procedure | - | | | - +======================+===================================================+ - | User Interface (UI) | 1. Open IIS Manager and navigate to the | - | | web server node in the tree. | - | | | - | | 2. In the **Actions** pane, click **Stop**. | - +----------------------+---------------------------------------------------+ - | Command Line | 1. Open a command line window as | - | | administrator. | - | | | - | | 2. At the command prompt, type **net stop WAS** | - | | and press **ENTER**. | - | | | - | | 3. (Optional) To stop W3SVC, type **Y** and | - | | then press **ENTER**. | - +----------------------+---------------------------------------------------+ -12. Now you should be able to open a web browser to your ownCloud server and +11. Now you should be able to open a Web browser to your ownCloud server and log in as usual. You have a couple more steps to go: You should see a - **Start Update** screen. Review the prequisites, and if you have followed - all the steps click the **Start Update** button. + **Start Update** screen, just like in the **Upgrading With Your Linux + Package Manager** section, above. Review the prerequisites, and if you have + followed all the steps click the **Start Update** button. - - If you are an enterprise customer, or are running a large installation with - a lot of files and users, you should launch the update from the command - line using ``occ`` to avoid timeouts, like this example on Ubuntu Linux:: + If you are running a large installation with a lot of files and users, + you should launch the upgrade from the command line using ``occ`` to + avoid PHP timeouts, like this example on Ubuntu Linux:: $ sudo -u www-data php occ upgrade @@ -187,9 +198,8 @@ To start the Windows IIS web server, you can use either the user interface Assuming your upgrade succeeded, take a look at the bottom of the Admin page to verify the version number. Check your other settings to make sure they're correct. Go to the Apps page and review the core apps to make sure the right -ones are enabled. - -Now you can review your third-party apps, and upgrade and enable them. +ones are enabled. Now you can review your third-party apps, and upgrade and +enable them. Troubleshooting ---------------