# Backup The Moodle Database

### Moodle Database Backup

#### MySQL Database Dump

1. Backup Moodle database with the command below

```
mysqldump -u [username] –p[password] [database_name] > [dump_file.sql]

The parameters of the said command as follows:

  [username] - A valid MySQL username
  [password] - A valid MySQL password for the user (leave empty to be prompted for password)
  [database_name] - A valid Database name you want to take backup
  [dump_file.sql] - The name of backup dump file you want to generate
```

#### Downloading the file

1. Download the file a backup medium for safekeeping