0

My company has two web based project. Our main project (Starbooks) was built using xampp server and Codeigniter framework that installed in our Windows OS and the second project (Frontlearners) was built in Lamp server and moodle (LMS) framework with Postgres database that installed in ubuntu platform.

My goal is to collide this two projects into one by moving the second project (Frontlearners) into the main project (Starbooks) server which uses with xampp server windows platform.

My first attempt is to export the moodle Postgres database using PGAdmin then move the moodle project to the main project server on windows. But I don't know if this is the correct way or not because Postgres and mysql are different database type. I've searching across the internet hoping for the answer or tutorial related to my problem but the results are always fresh installation of moodle which is not related to my problem.

Anybody knows how to solve this problem, a tutorial link, or any article about this situation?

O. Jones
  • 103,626
  • 17
  • 118
  • 172
  • What have you tried so far? Where are you stuck? – Nico Haase Nov 03 '21 at 10:44
  • @NicoHaase right now I'm trying to implement phppgadmin to my xampp server so I can run both sql and postgresql on my server. By doing this, I have face another problem because I can't login to the postgres database. If only I can convert postgre database to sql maybe it much easier than this i think. – Mak143 Bas Nov 08 '21 at 13:55
  • Russell England answer is correct I think. – Mak143 Bas Nov 08 '21 at 13:59

1 Answers1

0

There is a database transfer tool in Moodle.

https://docs.moodle.org/311/en/Database_transfer

So you can convert the PostgreSQL database to MariaDB

First ensure MariaDB is installed on Ubuntu

Turn off cron and put the site in maintenance mode

Then go to Site administration > Development > Experimental > Database migration to convert the database.

Or direct to /admin/tool/dbtransfer/index.php

The tool will check the database structure matches the structures in the install.xml files. If there are any differences, then you will need to update the relevant install.xml file or database table before continuing.

If its a large database, then the UI will probably time out. So use the command line version instead:

php admin/tool/dbtransfer/cli/migrate.php --help

Having said all that, IMHO I would transfer the Windows project to Linux.

Russell England
  • 9,436
  • 1
  • 27
  • 41