ownCloud Upgrade - bapowell/bapowell.github.io GitHub Wiki

Upgrading (major release) ownCloud on OpenShift

Notes

  • The instructions below are for manually updating to the latest major release of ownCloud (e.g. v5.0.13 to v6.0.0a).
  • You can also try using the ownCloud updater plugin called "Updater", which is an internal app that is present in the ownCloud installation. See the link below under References for instructions.

References

Backup

Deactivate all third-party applications.

Backup the ownCloud database

ssh to OpenShift
# The following assumes using MySQL for the ownCloud database:
mysqldump --lock-tables -u ${OPENSHIFT_MYSQL_DB_USERNAME} --password=${OPENSHIFT_MYSQL_DB_PASSWORD} -h $OPENSHIFT_MYSQL_DB_HOST -P $OPENSHIFT_MYSQL_DB_PORT $OPENSHIFT_GEAR_NAME > $OPENSHIFT_DATA_DIR/${OPENSHIFT_GEAR_NAME}_db_backup_$(date +"%Y%m%d").sql
exit

Backup the ownCloud files (in local git repository)

cd [local OpenShift git repository]
rsync -a owncloud/ owncloud_backup_$(date +"%Y%m%d")/

Upgrade

Login to OpenShift (rhc)

cd [local OpenShift git repository]
rhc account --rhlogin [account email address]
rhc app show owncloud   # just to verify this is the correct account and app
cd owncloud
git status   # make sure everything is clean

In the local git repository, delete everything from the ownCloud installation directory, except data and config (note that data/ may not exist in this directory).

# assuming at this point that you're in the owncloud app directory
cd php
ls | grep -v 'data\|config' | xargs rm -r

Download latest ownCloud and install to local app repository

Note: using 6.0.0a for these instructions

cd ../..   # back out of the owncloud app directory
mkdir owncloud-6.0.0a
cd owncloud-6.0.0a
wget http://download.owncloud.org/community/owncloud-6.0.0a.tar.bz2
tar xjvf owncloud-6.0.0a.tar.bz2
cd ..
rsync --inplace -rtv owncloud-6.0.0a/owncloud/ owncloud/php/
# optional clean-up:  rm -rf  owncloud-6.0.0a/
cd owncloud
git status   # show modified and untracked files

Commit and deploy to OpenShift

Note: Make sure git user.name and user.email have been set appropriately.

(assume currently in the owncloud app directory)
git add .
git commit -a -m "Upgrade of ownCloud from v5.0.13 to v6.0.0a"
git push

Log in to ownCloud to initiate the update