{"id":1486,"date":"2018-12-01T14:43:25","date_gmt":"2018-12-01T11:43:25","guid":{"rendered":"http:\/\/kifarunix.com\/?p=1486"},"modified":"2022-02-15T21:18:11","modified_gmt":"2022-02-15T18:18:11","slug":"how-to-upgrade-owncloud-9-to-owncloud-10-on-ubuntu-16-04","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/how-to-upgrade-owncloud-9-to-owncloud-10-on-ubuntu-16-04\/","title":{"rendered":"How to Upgrade ownCloud 9 to ownCloud 10 on Ubuntu 16.04"},"content":{"rendered":"\n
Hello there, welcome to our guide on how to upgrade ownCloud 9 to ownCloud 10 on Ubuntu 16.04 . ownCloud 10 also ownCloud X<\/a> is the lastest version.<\/p>\n\n\n\n So you could be still running ownCloud server version 9 and whenever you want to synchronize your files with your upto-date ownCloud desktop client you get some version mismatch issues? Worry not because in this guide, we will show you on how to upgrade to the latest version of ownCloud so that you can continue enjoying the beauty of sharing you files and data over this amazing platform.<\/p>\n\n\n\n The interface for ownCloud 9 looks like as shown below;<\/p>\n\n\n\n Well, before you can begin the upgrade process, ensure that you meet the following minimums;<\/p>\n\n\n\n Update and upgrade your server to ensure that other ownCloud mandatory requirements are updated.<\/p>\n\n\n\n There are three ways in which ownCloud server can be upgraded;<\/p>\n\n\n\n In this guide, we are going to learn how to upgrade ownCloud using, of course, the recommended method, manual upgrade<\/strong>.<\/p>\n\n\n\n As mentioned above, make the necessary backups as shown below;<\/p>\n\n\n\n Backup ownCloud server directory;<\/p>\n\n\n\n This ensures that a copy is made with permissions preserved.<\/p>\n\n\n\n Backup the ownCloud database;<\/p>\n\n\n\n Now, if you check you home folder;<\/p>\n\n\n\n NOTE<\/strong>: You can as well take a snapshot<\/strong> of the current state of your server so that you can always restore to it in case things go south. Nothing outdo a snap of the finger restore!!<\/p>\n\n\n\n Before you can proceed, put ownCloud on maintenance mode. This prevents new logins and locks the sessions of the logged in users. ownCloud will also display the status on the web UI to let users know what is happening.<\/p>\n\n\n\n To enable maintenance mode, you can edit the Now, if you try to access ownCloud, you will see a status informing you of the state.<\/p>\n\n\n\n Navigate to ownCloud download page<\/a> and obtain the latest release source archive. Once you obtain the source archive link, you can simply download it as follows;<\/p>\n\n\n\n Once the download is done, rename the original ownCloud folder an extract the new source archive to ownCloud web root directory, Copy the old ownCloud data directory to the new source directory.<\/p>\n\n\n\n Replace the new config.php file with the old one;<\/p>\n\n\n\n Once you have your old data in place, run the command below to upgrade ownCloud.<\/p>\n\n\n\n Once the upgrade is done, you can verify the version of ownCloud by running the command below;<\/p>\n\n\n\n If you had any old Apps, you can now copy them to the new Apps directory.<\/p>\n\n\n\n ownCloud recommends the use of PHP 7.2 in new installations. Note that there are no official PHP 7.2 repositories on Ubuntu 16.04. Thanks to Ond\u0159ej Sur\u00fd’s PHP PPA<\/a> repositories. Therefore, add the PPA respos and make the necessary updates.<\/p>\n\n\n\n You can optionally remove PHP 7.0 and install php7.2<\/p>\n\n\n\n Verify the version.<\/p>\n\n\n\n If the upgrade is successful, disable maintenance mode by running the command below;<\/p>\n\n\n\n Start your cron job service and the web server<\/p>\n\n\n\n You can now login to your new ownCloud server. You should be welcomed by a new ownCloud X web interface.<\/p>\n\n\n\n You have successfully upgraded ownCloud 9 to ownCloud X on Ubuntu 16.04. You can now login and verify that every other previous setting is fine. Thank you for reading.<\/p>\n\n\n\n Other similar tutorials<\/p>\n\n\n\n Install ownCloud Desktop Client on CentOS 8<\/a><\/p>\n\n\n\n Install ownCloud Desktop Client on Debian 10 Buster<\/a><\/p>\n\n\n\n<\/a><\/figure>\n\n\n\n
Upgrade ownCloud 9 to ownCloud 10<\/h2>\n\n\n\n
Pre-requisites<\/h3>\n\n\n\n
data directory<\/span><\/code>,
config.php<\/span><\/code>,
3rd party apps<\/span><\/code> and
ownCloud database<\/span><\/code>.<\/li>
Update the server<\/h4>\n\n\n\n
apt update && apt upgrade -y<\/code><\/pre>\n\n\n\n
Manual ownCloud Upgrade<\/h4>\n\n\n\n
rsync -avpP \/var\/www\/owncloud \/opt\/backups\/<\/code><\/pre>\n\n\n\n
mysqldump -u root -p owncloud > \/home\/amos\/owncloud-`date +%F`.sql<\/code><\/pre>\n\n\n\n
ls -l \/home\/amos\/\ntotal 68\ndrwxr-xr-x 17 amos amos 4096 Nov 30 17:09 owncloud\n-rw-r--r-- 1 amos amos 63216 Dec 1 11:19 owncloud-2018-12-01.sql<\/code><\/pre>\n\n\n\n
Enable ownCloud Maintenance Mode<\/h4>\n\n\n\n
\/var\/www\/owncloud\/config\/config.php<\/span><\/code> and change the value of
'maintenance'<\/span> =><\/span><\/code>
false,<\/span><\/code> to
'maintenance'<\/span> =><\/span> true,<\/span><\/code>. This can also be simply done by the use of
occ command<\/span><\/code> as shown below;<\/p>\n\n\n\n
sudo -u www-data php \/var\/www\/owncloud\/occ maintenance:mode --on<\/code><\/pre>\n\n\n\n
<\/a><\/figure>\n\n\n\n
Stop Cron Jobs<\/h4>\n\n\n\n
systemctl stop cron<\/code><\/pre>\n\n\n\n
Stop the Web Server<\/h4>\n\n\n\n
systemctl stop apache2<\/code><\/pre>\n\n\n\n
Download the Latest ownCloud Server Release<\/h4>\n\n\n\n
wget https:\/\/download.owncloud.org\/community\/owncloud-10.0.10.tar.bz2 -P \/tmp\/<\/code><\/pre>\n\n\n\n
Prepare ownCloud for Upgrade<\/h4>\n\n\n\n
\/var\/www\/<\/span><\/code>.<\/p>\n\n\n\n
mv \/var\/www\/owncloud \/var\/www\/owncloud-bak\ntar xjf \/tmp\/owncloud-10.0.10.tar.bz2 -C \/var\/www\/<\/code><\/pre>\n\n\n\n
rsync -avpP \/var\/www\/owncloud-bak\/data \/var\/www\/owncloud\/<\/code><\/pre>\n\n\n\n
rsync -avpP \/var\/www\/owncloud-bak\/config \/var\/www\/owncloud\/<\/code><\/pre>\n\n\n\n
Upgrade ownCloud<\/h4>\n\n\n\n
sudo -u www-data php \/var\/www\/owncloud\/occ upgrade<\/code><\/pre>\n\n\n\n
sudo -u www-data php \/var\/www\/owncloud\/occ -V\nownCloud is in maintenance mode - no app have been loaded\n\nownCloud 10.0.10<\/strong><\/code><\/pre>\n\n\n\n
Upgrade PHP to PHP 7.2<\/h4>\n\n\n\n
add-apt-repository ppa:ondrej\/php\napt update<\/code><\/pre>\n\n\n\n
apt remove php7.0*\napt autoremove\napt install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-curl php7.2-gd php7.2-intl\\\n php7.2-json php7.2-ldap php7.2-mbstring php7.2-mysql php7.2-xml php7.2-zip php7.2-bz2<\/code><\/pre>\n\n\n\n
php -v\nPHP 7.2.12-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Nov 12 2018 09:55:12) ( NTS )\nCopyright (c) 1997-2018 The PHP Group\nZend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies\n with Zend OPcache v7.2.12-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies<\/code><\/pre>\n\n\n\n
Disable Maintenance Mode<\/h4>\n\n\n\n
sudo -u www-data php \/var\/www\/owncloud\/occ maintenance:mode --off<\/code><\/pre>\n\n\n\n
Restart the Webserver<\/h4>\n\n\n\n
systemctl restart cron\nsystemctl restart apache2<\/code><\/pre>\n\n\n\n
<\/a><\/figure>\n\n\n\n