Migrating 9.1.6 data to 10.3.0

I am running oc 9.1.6 on an old CentOS server. I setup a new Debian server and have installed docker on it. I plan to install the latest owncloud/server container from dockerhub on the new server.

I want to restore the mysql data from my 9.1 instance to the mariadb in the docker container. Will I need to convert the data somehow before restoring oc v 9 data to version 10? If so please point me to the instructions.

Thanks for your attention.

1 Like

Hi frogola,
This is a very common question.
The standard answer to this is that you need to go through every single X.Y release and run the upgrades in between.
But you’re a little bit lucky as there is an exception as you’re on >9.1 because of this:


That means that you can at least go directly to 10.2.1 and from there you should be able to go to 10.3 But when 10.3. is finally released I would double check if it is still possible to directly upgrade there.
Here is the documentation on how to upgrade an ownCloud instance:
https://doc.owncloud.org/server/10.2/admin_manual/maintenance/manual_upgrade.html

However another thing you have to be aware of is that you can’t upgrade and change the data directory at the same time. So make yourself familiar with the docker container first, look where it safes its data. Migrate your data folder in your old instance before your attempt the upgrade.
More information in the documentation on how to move the data folder here:
https://doc.owncloud.org/server/10.2/admin_manual/maintenance/manually-moving-data-folders.html

1 Like

Thanks for the reply eneubauer. I am using 10.2.1 per your advice, I didn’t realize that 10.3 was still in test. The docker container starts up and I can login but my user files are not displayed. I identified the data user files location and copied the old ones there, and changed the user and group to www-data, but still they don’t appear in the browser file listing. I did see a couple of errors in owncloud.log:

{“reqId”:“89jGZErotd3MP3zD9njQ”,“level”:3,“time”:“2019-09-26T23:15:22+00:00”,“remoteAddr”:"",“user”:"–",“app”:“no app in context”,“method”:"–",“url”:"–",“message”:“User backend OC\User\Database is returning home: /mnt/data/files/ocadminz for user: ocadminz which differs from existing value: “}
{“reqId”:“2b49JrdLBgZaHS5B7p22”,“level”:3,“time”:“2019-09-26T23:16:01+00:00”,“remoteAddr”:””,“user”:"–",“app”:“files”,“method”:"–",“url”:"–",“message”:“Exception: {“Exception”:“OC\\ForbiddenException”,“Message”:”",“Code”:0,“Trace”:"#0 \/var\/www\/owncloud\/lib\/private\/Files\/Utils\/Scanner.php(139): OC\\Files\\Utils\\Scanner->shouldScan(Object(OC\\Files\\Mount\\MountPoint))\n#1 \/var\/www\/owncloud\/apps\/files\/lib\/BackgroundJob\/ScanFiles.php(87): OC\\Files\\Utils\\Scanner->backgroundScan(’’)\n#2 \/var\/www\/owncloud\/apps\/files\/lib\/BackgroundJob\/ScanFiles.php(111): OCA\\Files\\BackgroundJob\\ScanFiles->runScanner(Object(OC\\User\\User))\n#3 \/var\/www\/owncloud\/lib\/private\/BackgroundJob\/Job.php(66): OCA\\Files\\BackgroundJob\\ScanFiles->run(NULL)\n#4 \/var\/www\/owncloud\/lib\/private\/BackgroundJob\/TimedJob.php(63): OC\\BackgroundJob\\Job->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#5 \/var\/www\/owncloud\/cron.php(120): OC\\BackgroundJob\\TimedJob->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#6 {main}",“File”:"\/var\/www\/owncloud\/lib\/private\/Files\/Utils\/Scanner.php",“Line”:192}"}

Sorry for junking up this reply but maybe someone has seen these errors before? The first one looks like a database error, and the second is from Scanner.php but, interestingly there is no native directory on my host /var/www so it must be in the container. Hence I haven’t examined line 192 to see what it’s trying to do.

I may call it a night and resume work tomorrow on this.

frogola

Just a quick note, in case anyone is reading this, I realized that I failed to copy the config and data directories, as well as not backing up and restoring the database. Probably rather important. I’ll do it tomorrow and send a status. Don’t waste time trying to help me until that’s done. Sorry!

1 Like

OK I successfully moved my files and calendar data to the docker container instance running on my new server. Next I need to figure out how to get my letsencrypt ssl cert installed and working with owncloud’s redis container, I guess. But that’s another topic, so this one is done.

If you’re still using the official owncloud-docker setup redis shouldn’t be publicly available and therefore I see a reason why you would need to encrypt the traffic. Or am I misunderstanding your SSL setup intentions?

1 Like

I ended up using traefik [reverse proxy] in another container to handle the ssl. So far it works just fine.

2 Likes