Changes

Jump to navigation Jump to search
2,065 bytes added ,  22:13, 27 October 2015
→‎Upgrade: More detailed upgrade instructions
Line 76: Line 76:  
==Upgrade==
 
==Upgrade==
   −
Upgrade to a higher version is simple! First take a backup of all files in the Owncloud ibay and the database. You then delete all files beside the data and config folder in the ibay and uppack the bz2 archive to the ibay. Then point you browser to the ibay and follow instructions.
+
Upgrading from one minor version to the next (e.g., from 8.1.2 to 8.1.3) can be done using the updater app inside ownCloud. Just log in to the web site as admin, go to the admin page, and scroll down to the update center.  However, major version upgrades (e.g., 8.1.x to 8.2.x) will require some work at the command line. The steps below assume that you've used PHP software collections to install an appropriate version of PHP for ownCloud, and that you've set your ownCloud ibay to use PHP version 5.6.
    +
You'll first need to download the distribution .tar.bz2 file.  Place it in the ownCloud ibay, in the files subdirectory.
 +
 +
Second, put ownCloud in maintenance mode, so that no changes will be made to the database or to the files on disk while you do your upgrade.  Do this with
 +
# cd ~owncloud/../html
 +
# sudo -u www scl enable php56 'php occ maintenance:mode --on'
 +
 +
Third, take backups of the ownCloud directory and database.
 +
# cd ~owncloud/..
 +
# rsync -Aaxv html owncloud-dirbkp_`date +"%Y%m%d"`/
 +
# mysqldump --lock-tables owncloud > owncloud-sqlbkp_`date +"%Y%m%d"`.sql
 +
 +
Next, unpack the ownCloud distribution file.
 +
# cd ~owncloud/..
 +
# tar xjfv files/owncloud-8.2.0.tar.bz2
 +
 +
Then you'll need to rename a couple of directories, and move some files around.
 +
# cd ~owncloud/..
 +
# mv html html_old
 +
# mv owncloud html
 +
# mv html_old/data/ html/
 +
# cp html_old/config/config.php html/config/
 +
 +
Once the directories are renamed and the files are back in the right place, you'll want to kick off the upgrade at the command line and then disable maintenance mode.  If you do not run the upgrade from the command line, the web interface will prompt you to do this the next time you log in as admin.  However, for a larger installation, PHP may time out before finishing the operation.  Therefore, it's recommended to do it from the command line.
 +
# cd ~owncloud/../html
 +
# sudo -u www scl enable php56 'php occ upgrade'
 +
# sudo -u www scl enable php56 'php occ maintenance:mode --off'
 +
 +
Your ownCloud installation is now upgraded, and you can log into the web interface to ensure that everything works properly.  Once you've confirmed this, you'll probably want to clean up the ibay a little bit.
 +
# cd ~owncloud/..
 +
# bzip2 owncloud-sqlbkp_20151027.sql
 +
# tar -cvjSf owncloud-dirbkp_20151027.tar.bz2 owncloud-dirbkp_20151027/
 +
# rm -rf html_old
 
{{Note box|It is only possible to upgrade one step at a time. E.g. you can not upgrade from version 6 to 8 directly but have to make 2 upgrades from 6 to 7 and then 7 to 8}}
 
{{Note box|It is only possible to upgrade one step at a time. E.g. you can not upgrade from version 6 to 8 directly but have to make 2 upgrades from 6 to 7 and then 7 to 8}}
  
147

edits

Navigation menu