Resume and bio of the author Couple of articles related to my hobby - robotics
My impressions about immigration to Australia. In Russian only. Recipes for everyday problems solving
Linux-related posts Windows-related posts
Software-related posts A lot of info about hardware
Different tools you might find useful Posts about various web technologies
Everything that doesn't fit the rest of the menu RSS feed for this blog

Tag Cloud



Andrey Mikhalchuk’s Blog

Technoblog about life

Jul 18, 2014 How to migrate ownCloud 6 from sqlite to MySQL

Those who do not know what ownCloud is probably should read about it here: This is an awesome tool that provides functionality similar to dropbox, but uses your own server to host the files. We all know about dropbox’s bad behavior like storing passwords on the server side, accessing your content when you don’t want it. Actually recently I was monitoring disk activity on a computer with dropbox installed on it and found that for some reason dropbox keeps reading files where it has not business to do. It was clearly configured to replicate files in its own folder, yet was reading all files on the disk. One way or another there are a lot of reasons to get rid of dropbox and switch to ownCloud. It’s cheaper, secure and can be used to store business or confidential information where dropbox fails to provide both security and confidentiality.

By default ownCloud uses sqlite3 to keep records of the files it stores and people like myself that decided to go forth with the default configuration get trapped with this configuration. Once you load more than couple gigs of data you will notice that it gets slower and sloooower and slo… Sometimes you might even experience complete freeze on the client side.

The solution to the problem is moving the data from sqlite to something mroe serious like MySQL. Both databases have SQL in their name so the migration should be easy. Unfortunately ownCloud doesn’t provide any means to automate this migrate. To make matters worse the dialects sqlite3 and MySQL use are a little bit different so you can’t feed sqlite3 database dump directly into MySQL. I saw multiple solutions to the problem migrating ownCloud 5, but nothing for OC6 so far. Here is how I migrated it in just a few simple commands:

Site Map (c) Andrey Mikhalchuk, 2005-2008