Upgrading Your ownCloud Server — ownCloud 8.0 Server Administration Manual 8.0 documentation

Manual Upgrade Procedure

Always start by making a fresh backup.

If you are upgrading to a major release, for example from 8.1.3 to 8.2, 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.

Next put your server in maintenance mode. This prevents new logins, locks the sessions of logged-in users, and displays a status screen so users know what is happening. There are two ways to do this, and the preferred method is to use the occ command, which you must run as your HTTP user. This example is for Ubuntu Linux:

$ sudo -u www-data php occ maintenance:mode --on

The other way is by entering your config.php file and changing 'maintenance' => false, to 'maintenance' =>true,.

  1. Back up your existing ownCloud Server database, data directory, and config.php file. (See Backing up ownCloud.)
  2. 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/

To unpack your new tarball:: tar xjf owncloud-latest.tar.bz2

  1. Stop your Web server.
  2. Rename or move your current ownCloud directory (named owncloud/ if installed using defaults) to another location.
  3. 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 .
  4. Copy and paste the config.php file from your old version of ownCloud to your new ownCloud version.
  5. If you keep your data/ directory in your owncloud/ directory, copy it from your old version of ownCloud to theowncloud/ directory of your new ownCloud version. If you keep it outside of owncloud/ then you don’t have to do anything with it, because its location is configured in your original config.php, and none of the upgrade steps touch it.

We recommend storing your data/ directory in a location other than your owncloud/ directory.

  1. Restart your Web server.

  2. 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, just like in theUpgrading 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 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
    

    The occ command does not download ownCloud updates. You must first download and install the updated code (steps 1-3), and then occ performs the final upgrade steps.

  3. The upgrade operation takes a few minutes to a few hours, depending on the size of your installation. When it is finished you will see a success message, or an error message that will tell where it went wrong.

Assuming your upgrade succeeded, take a look at the bottom of your 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. Re-enable your third-party apps. Then apply strong permissions to your ownCloud directories (Setting Strong Directory Permissions).

Source: Upgrading Your ownCloud Server — ownCloud 8.0 Server Administration Manual 8.0 documentation

Upgrading Your ownCloud Server — ownCloud 8.0 Server Administration Manual 8.0 documentation was last modified: July 13th, 2017 by Jovan Stosic