How to migrate my moodle (hosted a mac or a linux) to YNH Moodle?

Hello… I’m using Moodle for years, but it’s harder and harder to make it work properly on a mac… I’d like to migrate to the Moodle that I recently installed in my YUNOHOST, using the appropriate package…

where’s the sql database ? I can’t find it in phpmyadmin… where’s the moodledata folder ?

If someone can give me some clues… thanks !

anyone ?

You could install moodle with the package and replace datafile database and adapt some config if needed.

If you need to know how is made the install by the package see https://github.com/YunoHost-Apps/moodle_ynh/blob/master/scripts/install

er… sorry, but no. dDatabase and config is wayyyyyyy no enough… you got to add a lot of thing in the “moodledata” folder which depends how it was renamed here… (all pictures, files, etc… which is not the original moodle distribution)

For the rest, I found some info mysef: no MySql databse, it’s a Postgresql database… but PGAdmin refuses to install… which is needed to deal with PostgreSQL …

and no,

that’s what i mean with “datafile”

Without pgadmin you can do it with cli (less user friendly). If you have a mysql database i think there is a compatibility mode for the dump of your db

BTW, here’s the log about PgAdmin that refuses to install:
https://paste.yunohost.org/raw/erarafumuz

OK, so, in the end, I installed Moodle as a custom webapp… and migrate mysql databases to MariaDB, avoiding to convert my databases to PostgreSQL.

1- on the “old” moodle, deinstall all additionnal plug ins that aren’t used and eventually even those that are used but who aren’t updated
2- dump the moodledatabase and copy it to the YNH, in a simple-to-find directory
3- create a moodle database in MariaDB and import the dump
4- check phpMyAdmin
5- create a custom webapp, log with terminal, use git to install a clean Moodle install in /var/www/my_webapp/www/
6- send your brower to https://your.yournohost.domain/site/moodle/
7- Go on with the fresh install as it was a new one, fill in informations from MariaDB, pointing to the imported database
8- Change permissions on myweb_app folder, moodle folder to allow installation… from that, the Moodle will change to “new installation” to “upgrading installation”…
9- update plugs in, reinstall them as it is asked, and finish the install/upgrade
10- import your moodledata and overwrite the one created by the fresh installation, then change the permission to owner my_webbapp and group www-data for all sub-folders

and voila. (I probably forgot a tiny thing or two, but well… it’s 4 in the morning, eh…)

1 Like