Cpanel Moodle migration to Bitnami moodle stack
Cpanel Moodle migration to Bitnami moodle stack
Date Posted: 17-09-2018
Cpanel Moodle :
- Take backup of moodledata and moodle files at cpanel server
- Take database dump of moodle instance using phpmyadmin or commandline
- Transfer files to new server
Bitnami Moodle Stack Server:
You can start generating backups for existing account at new server.
Backup Existing Data
Copy the following directories:-
/opt/bitnami/apps/moodle/htdocs/
/opt/bitnami/apps/moodle/moodledata
Stop Bitnami Service
sudo /opt/bitnami/ctlscript.sh stop
Rename the current folder
sudo mv /opt/bitnami /opt/bitnami.backup
Copy And Restore Data
Login to new server via SSH
Stop Apache:
sudo /opt/bitnami/ctlscript.sh stop apache
Delete the Moodle and Moodle data folder of this new instance:
rm -rf /opt/bitnami/apps/moodle/htdocs/
rm -rf /opt/bitnami/apps/moodle/moodledata
Restore the database to this server
mysql -u root -p db_name < db_name.sql
Now restore the Moodle (/opt/bitnami/apps/moodle/htdocs/) and Moodle data (/opt/bitnami/apps/moodle/moodledata*) folder from the old installation into the new instance.
Start apache:
sudo /opt/bitnami/ctlscript.sh start apache
Your moodle migration is done !!!