Saving & restoring mySQL databases + tuning the apps data location

Hi,

First, I must say I am impressed (and enjoyed) by Yunohost. Nice job !

In order to migrate a regular owncloud installation to an owncloud within yunohost, I have restored under yunohost my previously saved owncloud database (using the mySQL passwd I finally found in “/etc/yunohost/mysql”). My yunohost users have the same logins as the restored ownclouds users.

But, since I have restored my saved owncloud database, the SSO does no more work with owncloud. And it is even not possible to log into owncloud…

Any idea to fix that ? Thanks !

By restoring your sql dump, you have probably overridden the specific configuration applied during the Yunohost owncloud installation.

This might be a little tricky, but the best pointer would be around those lines :


and try to reapply some, if not all, of the sql/ldap configuration snippets.

Also you might need to import only a subset of your sql dump. Not sure but you might need to filter out the users related tables…

Good luck, and please come back here when you’re done to describe how you did it !

Thank you for your answer.

Actually, I had already given a look to the owncloud install & upgrade scripts, but with no success to fix the problem. As you say, I should have not imported all the owncloud database, but only some tables. But, as I am only interested by the calendar (for one user), I will perhaps forgive that and start from scratch removing and reinstalling owncloud .

Another point is annoying for me is that I am running yunohost on a Cubox on which the OS is on a small SD card (4Go) and all the data on an external HD. So, I need to set up the applications (transmission, owncloud, emails) to store their data on the mounted HD. But it does not seem to be implemented in yuno.

So, for that purpose, would you advice me:

  • to tune each app in order to change it storage location
  • to build symbolic links within the /home/user/defaultYunoAppsStorageFolder or /var/mail --> /mnt/myHD/theChosenAppLocation/

What solution would be the most robust to yuno upgrade/updates? Moreover, any plan for yuno developers to allow that tuning in the future (for instance to ask for the /home/ location) ?

Thank you !

You don’t need to tune each app.

Most apps create files on /var, /opt and /home.

Simply create home, var and opt on your external HD, copy existing data (with proper permissions, hidden files, etc…) and mount them on your host sytem. Using /etc/fstab is probably the best option, but symlinks will work too I guess.

Thank you for the answer. I did like you propose and it works.

For my owncloud calendar restore topic, I finally have exported the owncloud calendar into a .ics file (can be done from the owncloud calendar app). Then, on the yunohost server, I have uploaded the .ics file into owncloud, using the “file” owncloud app. And finally, when clicking on this .ics file, owncloud propose to import the calendar data into a calendar. Quite easy !