Difference between revisions of "Upgrading ownCloud to New Version Releases"

From Amahi Wiki
Jump to: navigation, search
Line 94: Line 94:
 
     'maintenance' => false,
 
     'maintenance' => false,
 
     );
 
     );
 
 
 
 
* Using a "terminal" connection and using the command-line '''OR''' an Amahi MySQL application, restore the ownCloud database from backups.
 
* Using a "terminal" connection and using the command-line '''OR''' an Amahi MySQL application, restore the ownCloud database from backups.
* Login to the admin ID as usual.
+
* Using an Internet Browser navigate to ownCloud, the upgrade will now begin. Follow any instructions given by the ownCloud upgrade process.
 +
* If the upgrade was successful, login to the ownCloud "admin" ID as usual.
 
* Navigate to Settings => Admin and the confirm new version release number.
 
* Navigate to Settings => Admin and the confirm new version release number.
 
* Confirm some of the other settings and make appropriate changes (file upload/download sizes, versioning).
 
* Confirm some of the other settings and make appropriate changes (file upload/download sizes, versioning).

Revision as of 20:11, 26 November 2014

Msgbox-WOPr.png Work In Progress
This article is currently undergoing major expansion or restructuring. You are welcome to assist by editing it as well. If this article has not been edited in several days, please remove this template.


ownCloud does not have a feature for automatically or for manually initiating the installation of new version releases. An administrator "update" feature (third party) is available, but will only work in a "traditional" LAMP server environment using ownCloud install defaults. Moving to a new release is achieved by installing a newly updated "one click install" Amahi package. Installing a new ownCloud release manually is also possible but can introduce security risks due to manual configuration changes. Reinstalling a new Amahi package is a safer practice than a manual install.

When there is a new ownCloud version release, any third party applications written by a "third party author" may not work as expected with a new release. It takes time for third party authors to update their applications to work with a new ownCloud release. Some third party applications can be "restored" from backups or re-installed from the ownCloud applications store successfully for a new ownCloud version release.

When moving to a new ownCloud version release the ownCloud Community has defined two activities, "updates" and "upgrades", as specific implementation activities.

  • Update: Bring an ownCloud instance to a new "point release" (ownCloud 6.0.5 => 6.0.6).
  • Upgrade: Bring an ownCloud instance to a new "major release" (ownCloud 6.0.6 => 7.0.3).


Updating ownCloud on Amahi

Use the following steps for updating ownCloud:

  • Catalogue all applications active in the current ownCloud instance. Take special care to identify the "core" applications that were activated and third party applications that were installed.
  • Review and document all ownCloud sharing techniques used in the current ownCloud instance.
  • Do backups of the ownCloud database, binaries and stored files.
  • Go to the Amahi Dashboard, Apps => Installed, and uninstall the current ownCloud instance. This will remove the ownCloud binaries and ownCloud database.
  • Go to the Amahi Dashboard, Apps => Available, and install the new ownCloud release.
  • Using a "terminal" connection, "cd" in to the ownCloud directory containing the binaries.
cd /var/hda/web-apps/owncloud/html
  • Restore the ownCloud "config" directory from backups.
  • Using a "terminal" connection and using the command-line OR an Amahi MySQL application restore the ownCloud database from backups.
  • Login to the admin ID as usual.
  • Navigate to Settings => Admin and the confirm new version release number.
  • Confirm some of the other settings and make appropriate changes (file upload/download sizes, versioning).
  • DO NOT turn the system over to users yet!
  • Navigate to Settings => Apps.
  • Compare the list of third party that were used in the previous ownCloud instance with the third party applications available in the newly installed release.
  • If all the third party applications match then restore the applications from backups.
  • If there is no match for the third party applications; activate the "core" applications needed, enable the third party applications needed. Please remember applications not available will take time for the third party authors to update for the new release version.
  • Login to a normal user ID and test ownCloud functionality (i.e. sharing) and applications.
  • If the prior testing was successful have other users test their ownCloud IDs.
  • The update is now completed.

Upgrading ownCloud on Amahi

Use the following steps for upgrading ownCloud:

  • It is extremely important that your current ownCloud instance is at the latest release number before the next major version release. This is important as there may have been some important meta data fixes (or other fixes) that the new major release is dependent on. If you skip this step the upgrade for ownCloud may have some problems at a future time.
  • Catalogue all applications active in the current ownCloud instance. Take special care to identify the "core" applications that were activated and third party applications that were installed.
  • Review and document all ownCloud sharing techniques used in the current ownCloud instance.
  • Disable all third party applications (not the "core" applications).
  • Do backups of the ownCloud database, binaries and stored files.
  • Go to the Amahi Dashboard, Apps => Installed, and uninstall the current ownCloud instance. This will remove the ownCloud binaries and ownCloud database.
  • Go to the Amahi Dashboard, Apps => Available, and install the new ownCloud release.
  • Using a "terminal" connection, "cd" in to the ownCloud directory containing the binaries.
cd /var/hda/web-apps/owncloud/html
  • Restore the ownCloud "config" directory from backups. Remember that this restore must be from the last major point release (i.e. 6.0.6) versus the new major release (i.e. 7.0.3) that will be the upgrade (not update).
  • The following sub-steps must be done for ownCloud releases from version 6.0.5 and beyond. Refer to the "ownCloud 6.0.5 and Future Updates/Upgrades on Amahi" section on this page for more information. The sub-steps use an upgrade from ownCloud 6.0.6 to 7.0.3 as an example.
Navigate to the ownCloud config directory:
  cd /var/hda/web-apps/owncloud7/html/config/
The restored "config" directory contains a file, "config.php" as follows:
   $CONFIG = array (
    'instanceid' => 'xxx',
    'passwordsalt' => 'xxxx',
    'datadirectory' => '/var/hda/files/owncloud6/data',
    'dbtype' => 'mysql',
    'version' => '6.0.6.1',
    'dbname' => 'owncloud6',
    'dbhost' => 'localhost',
    'dbtableprefix' => 'oc_',
    'dbuser' => 'owncloud6',
    'dbpassword' => 'owncloud6',
    'installed' => true,
    'theme' => ,
    'maintenance' => false,
   );
All references with "owncloud6" in this file must be changed to "owncloud7". DO NOT change the "version".
The changes can be made with a text editor or the following command:
   sed -i 's/owncloud6/owncloud7/g' /var/hda/web-apps/owncloud7/html/config/config.php
The "config.php" will be as follows:
   $CONFIG = array (
    'instanceid' => 'xxx',
    'passwordsalt' => 'xxxx',
    'datadirectory' => '/var/hda/files/owncloud7/data',
    'dbtype' => 'mysql',
    'version' => '6.0.6.1',
    'dbname' => 'owncloud7',
    'dbhost' => 'localhost',
    'dbtableprefix' => 'oc_',
    'dbuser' => 'owncloud7',
    'dbpassword' => 'owncloud7',
    'installed' => true,
    'theme' => ,
    'maintenance' => false,
   );
  • Using a "terminal" connection and using the command-line OR an Amahi MySQL application, restore the ownCloud database from backups.
  • Using an Internet Browser navigate to ownCloud, the upgrade will now begin. Follow any instructions given by the ownCloud upgrade process.
  • If the upgrade was successful, login to the ownCloud "admin" ID as usual.
  • Navigate to Settings => Admin and the confirm new version release number.
  • Confirm some of the other settings and make appropriate changes (file upload/download sizes, versioning).
  • DO NOT turn the system over to users yet!
  • Navigate to Settings => Apps.
  • Activate "core" applications that were used in the previous ownCloud instance.
  • Compare the list of third party applications that were used in the previous ownCloud instance with the third party applications available in the newly installed release.
  • Enable the third party applications that are available. Please remember applications not available will take time for the third party authors to update for the new release version.
  • Login to a normal user ID and test ownCloud functionality (i.e. sharing) and applications.
  • If the prior testing was successful have other users test their ownCloud IDs.
  • The upgrade is now completed.

ownCloud 6.0.5 and Future Updates/Upgrades on Amahi

In order to allow multiple instances of different version releases of ownCloud on the same Amahi server naming changes to the main ownCloud application directory and database names have been implemented.

  • The ownCloud organization is enforcing "strict" update/upgrade policies. Updates and upgrades will only allow to be executed on the last prior "point release" of ownCloud. In the past they allowed earlier point releases to be updated or upgraded. Sorry, no longer.
  • The location where the actual ownCloud application is stored has changed to "/var/hda/web-apps/owncloudx/html" (where "x" is the major release number). For example for ownCloud release version 6.0.5 the directory is now named owncloud6.
  • The ownCloud database user ID, password, and name have changed in the same manner. Before updating or upgrading changes will have to be made to the ownCloud "config.php" configuration file before proceeding further.
  • You may want to consider changing your ownCloud data file directory name for the same naming convention. Provided you used the name owncloud as part of the data directory name.
  • If you use automated backup and recovery software you may have to reload and reconfigure your ownCloud data and backup system configuration before the next backup set is taken. Some backup systems allow you to change the ownCloud directory names (data, ownCloud config,php location) in the existing backup sets (rsnapshot).



Main ownCloud Page