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

Updating (point release) ownCloud on OpenShift

Notes

  • The instructions below are for manually updating to the latest point release of ownCloud (e.g. v5.0.11 to v5.0.12).
  • 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

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")/

Update

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

Download latest ownCloud and install to local app repository

Note: using 5.0.12 for these instructions

cd ..   # back out of the owncloud app directory
mkdir owncloud-5.0.12
cd owncloud-5.0.12
wget http://download.owncloud.org/community/owncloud-5.0.12.tar.bz2
tar xjvf owncloud-5.0.12.tar.bz2
cd ..
rsync --inplace -rtv owncloud-5.0.12/owncloud/ owncloud/php/
# optional clean-up:  rm -rf  owncloud-5.0.12/
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 "Update of ownCloud from v5.0.11 to v5.0.12"
git push

Log in to ownCloud to initiate the update