Migrate Bitnami LMS powered by Moodle(TM) LMS

NOTE: We are in the process of modifying the file structure and configuration for many Bitnami stacks. On account of these changes, the file paths stated in this guide may change depending on whether your Bitnami stack uses native Linux system packages (Approach A), or if it is a self-contained installation (Approach B). To identify your Bitnami installation type and what approach to follow, run the command below:

 $ test ! -f "/opt/bitnami/common/bin/openssl" && echo "Approach A: Using system packages." || echo "Approach B: Self-contained installation."

The output of the command indicates which approach (A or B) is used by the installation, and will allow you to identify the paths, configuration and commands to use in this guide. Refer to the FAQ for more information on these changes.

There are two important steps when migrating a Bitnami LMS powered by Moodle(TM) LMS deployment: migrate the database and migrate the moodledata/ folder. You may want to migrate the themes/ and modules/ folders if you have them installed also.

To make this process easier, it will be divided into five sub-steps.

Export the database

You can do this manually or with phpMyAdmin. If you use phpMyAdmin, export it as an .sql file.

Copy the Moodle data folder

In this step, you just need to copy the Moodle LMS data directory (moodledata) to the machine where you have installed the new Bitnami LMS powered by Moodle LMS deployment. When doing this step, copy the exported database file too. If you have themes or modules installed and you want to keep them, you must also copy them.

Import the database

Delete the tables in the bitnami_moodle database. The easiest way is to use phpMyAdmin, but you can also do this manually. Once deleted, import the database exported earlier.

Substitute moodledata/ (and other) directories

Replace the moodledata/ directory, as well as the themes/ and modules/ directories if needed, with the ones from the original installation.

Restart and update the database

Once these steps are complete, restart the Apache server and access Moodle LMS through the browser. If you log in as an administrator, you will be asked to update your database. Click to do this and the migration of your Bitnami LMS powered by Moodle(TM) LMS stack will be completed.

For a more detailed walkthrough with commands, refer to our guide on migrating a Bitnami LMS powered by Moodle(TM) LMS stack.

Last modification December 21, 2022