ownCloud update 9.0.1 to 9.0.4

28. July 2016 ownCloud 4,738

I’m a novice when it comes to Linux systems and ownCloud.  So when I do updates, I’m pretty terrified at the idea.  However, I like to keep up with the latest before I get to far behind and they don’t support the desktop software or the software leaves my server version behind.  So here’s my most recent upgrade steps to migrate from v9.0.1 to v9.0.4   Keep in mind, I may not be doing it properly, or your way, but it works for me, for now.

My system consists of:

Ubuntu Server 14.04LTS
ownCloud v9.0.1

Before any Ubuntu server updates or ownCloud changes, I make a backup of ownCloud.  I suggest you do the same.

Since the new v9.1 has been released, you need to obtain 9.0.4 in a different repository than the default.  I like to REM out any old sources in my owncloud.list file and start over before any upgrades.

sudo nano /etc/apt/sources.list.d/owncloud.list

Comment out all the entries. Typically adding a “#” to the beginning of the line will REM/COMMENT those statements.  You can also just delete them.  Especially any OLD version repositories.

# deb http://download.opensuse.org/repositories/isv:/ownCloud:/community:/7.0/xUbuntu_14.04/ /
# deb http://download.opensuse.org/repositories/isv:/ownCloud:/community:/8.0/xUbuntu_14.04/ /
# deb http://download.opensuse.org/repositories/isv:/ownCloud:/community:/8.1/xUbuntu_14.04/ /
# deb http://download.owncloud.org/download/repositories/8.2.3/xUbuntu_14.04/ /
# deb http://download.owncloud.org/download/repositories/stable/xUbuntu_14.04/ /

Put ownCloud into Maintenance Mode:

cd /var/www/owncloud
sudo -u www-data php occ maintenance:mode –on
Run any Ubuntu OS Updates:
sudo apt-get update
Install any Ubuntu OS Updates:
sudo apt-get upgrade 
Remove no longer needed files:
sudo apt-get autoremove
ownCloud will still be in Maintenance Mode after reboot.  Move on to the ownCloud update.
sudo sh -c “echo ‘deb http://download.owncloud.org/download/repositories/9.0.4/Ubuntu_14.04/ /’ >> /etc/apt/sources.list.d/owncloud.list”
cd /var/www
sudo apt-get update
sudo apt-get install owncloud-files
cd /var/www/owncloud
** The next command –skip-migration-test doesn’t run a self-test before upgrade.  You can remove this statement and it will run a self test before it upgrades your database.  I usually skip it because the database is so large.  
sudo -u www-data php occ upgrade –skip-migration-test
*Optional – To Delete Folders in Skeleton Directory
sudo rm -rf /var/www/owncloud/core/skeleton/Documents
sudo rm -rf /var/www/owncloud/core/skeleton/Photos
Turn off Maintenance Mode
cd /var/www/owncloud
sudo -u www-data php occ maintenance:mode –off
Finished.  Good luck.

Leave a Reply