Moodle Database Backup download

Posted January 15, 2015 2.7k views

How do I get a backup of the database for an instance of Moodle installed on Digital Ocean Droplet?

1 comment
  • Thanks Sianios. I had someone else set this up and do not have the database name or password. If you have ideas of how I can retrieve them, I would appreciate hearing about them.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Execute the following command from terminal, replace username and database. with yours
“`mysqldump -u username -p moodledb > moodledb.sql


You can check our existing tutorial on how to back up a MySQL database:

To Export a database, open up the terminal, making sure that you are not logged into MySQL and type,

mysqldump -u [username] -p [database name] > [database name].sql


by Justin Ellingwood
MySQL is a popular database management system that is often used to manage the data from websites and applications. This guide will demonstrate how to backup the data in your MySQL databases, using a number of different methods.