database:dump
Dump structure and contents of a database
Usage:
drupal database:dump [arguments] [options]
dbduAvailable options
| Option | Details |
|---|---|
--file | The filename for your database backup |
--gz | Pass this option if you want the sql result file gzipped |
--exclude-cache | commands.database.dump.options.exclude.cache |
Available arguments
| Argument | Details |
|---|---|
database | Database key from settings.php |
target | Database target from settings.php |
Examples
Dump default database or the one specified on the argument
drupal database:dump \
<database>
Dump in gz compressed format
drupal database:dump \
--gz