Migrate Owncloud Server 7.0.4 (on Ubuntu 12.04) to Owncloud Server 9 (on Ubuntu 16.04)

help

#1

Hi there, I want to migrate my Owncloud Server Instance from Ubuntu 12.04 to Ubuntu 16.04.
The current owncloud server has Version 7.0.4 and cannot be further updated on Ubuntu 12.04.

Can I migrate directly from an instance of Owncloud Version 7 to an instance of Owncloud Version 9?
I assume not..

I cannot install Owncloud Version 7 on the Ubuntu 16.04 either because it says there is no installation candidate for php5 available.

What is a proper way to migrate to the new server? Is there a way to get Owncloud 7 running on Ubuntu 16.04? Do I need to set up a Server with Ubuntu 14.04 first?

Server configuration Old Server
Operating system: Ubuntu 12.04
Web server: Apache/2.2.22
Database: Mysql
PHP version: PHP 5.3.10-1ubuntu3.24
ownCloud version (see ownCloud admin page): 7.0.4.2
Updated from an older ownCloud or fresh install: n/a
ownCloud log (data/owncloud.log, see https://central.owncloud.org/t/how-to-find-webserver-or-oc-logfile-enable-php-logfile/808):

Server configuration New Server
Operating system: Ubuntu 16.04
Web server: Apache/2.4.18
Database: Mysql
PHP version: PHP 5.6.26 and PHP 7.0.11
ownCloud version (see ownCloud admin page):
Updated from an older ownCloud or fresh install: n/a
ownCloud log (data/owncloud.log, see https://central.owncloud.org/t/how-to-find-webserver-or-oc-logfile-enable-php-logfile/808):


#2

You should update using the .tar files. The documentation explains how this works.
Important: You need to upgrade from one major version to the next = 7.0 to 8.0 to 8.1 to 8.2 to 9.0 to 9.1


#3

Thank you for this really quick answer.
I assume you mean upgrading the old (running) server?


#4

Hi,

in my opinion the cleanest and fastest way to migrate from oC 7 to oC 9.1.1 on a new server would be:

  1. Make a backup of all your data (files, calendar, contacts) on client side
  2. Install a fresh oC 9.1.1 installation
  3. Import the backed up data from the clients back to the new install

#5

Yes. Of course do a backup upfront. Upgrading the OS should be rather easy in the end of the day. @RealRancor this approach will not work, due to migration scripts for the database in between major versions which are not part of 9.1.1 :frowning: We are still looking for skip upgrade solutions but have not found them yet.


#6

How many users are there in the system? If you have not many users, loosing some of the metadata might likely not hurt ... if you have 500+ users you will need to protect all the sharing + metadata inforation in the database where the migration scripts are essential.


#7

260 users with user management via LDAP user and group backend.
What's part of the metadata that would get lost?

edit: I don't know if it is relevant: The owncloud data itself is only mounted and is placed on a third server actually. The Mysql-Database is on the VM itself though.


#8

My approach will definitely work :slight_smile:

I never said that the OP should do a migration of his data. Rather i advised to do a fresh installation of oC 9.1.1 on the new server and re-import the data (re-upload files, import .ics files, impory .vcf files) from the clients.

With that approach all the trouble with upgrading over 6 major and risking all the upgrading issues from the past (especially between 7 and 8) are gone.


#9

Ok, that info about such a large user-base would have helped if it were provided from the beginning. :slight_smile:

Then the approach to make a fresh install is not applicable.


#10

Yep, the sharing info will be lost. If that is ok, while all the data is protected it is indeed the best approach if major upgrades were missed.


#11

Hi,
so what is the option to migrate owncloud 7.0.4 from 12.04 to new server 16.04 with new version of owncloud?
I wonder if someone can type here checklist how to do it.
thanks!!!

Avishay.


#12

Hi,

as Ubuntu 12.04 is only providing PHP 5.3 your only option is to migrate the ownCloud instance to the new server following the instructions provided here:

https://doc.owncloud.org/server/9.0/admin_manual/maintenance/migrating.html

Afterwards you can upgrade the instance step by step:

7.0.4 -> latest 7.0.x -> latest 8.0.x -> latest 8.1.x -> latest 8.2.x -> latest 9.0.x -> latest 9.1.x

by following the upgrading instructions provided here:

https://doc.owncloud.org/server/9.1/admin_manual/maintenance/upgrade.html

Make sure you have good backups as this is a quite huge upgrade path and no one can guarantee that it works as expected.


#13

Hi,
first of all, thanks for the quick answer,
But maybe I didn't wrote correctly,
I want to set all the user data on new server (not the same one). Now, I have the old 12.04 (damaged) ubuntu server with owncloud ver 7.04 and new fresh ubuntu 16.04 server without any installtion yet.
As I know, 16.04 is not usable with owncloud 7.04.
so, please I will be very appreciate if you will write me the steps what should i do.

thanks again for now,
Avishay.


#14

The steps where already provided above.


#15

But on 16.04 owncloud 7.04 to start the process.
so?....


#16

That is not possible as 16.04 has only PHP7 and the older ownCloud 7.0.4 is not able to run on PHP7.


#17

So if i'm understanding right, should i set new server 12.04 (or 14.04), install owncloud 7.0.4, migrate data and then upgrade to version 9 and at last, upgrade the server to 16.04?
thanks.


#18

Exactly:

  1. Migrate 7.0.4 to a new server providing PHP5.4-5.6 (Maybe a VM or similar)
  2. Upgrade step by step to 9.1.x as explained above
  3. Migrate 9.1.x to the new Ubuntu 16.04 server

#19

Hi,
thank you!
Avishay


#20

Hi, sorry for the late answer. For me it worked to go directly to Ubuntu 16.04 with oC 7.0.4 by installing php5.6 through the ondrej repository:

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0 php5.6-zip php5.6-XMLwriter php5.6-GD php5.6-ldap ldap-utils curl php5.6-curl smbclient php5.6-smbclient