Command line tools for importing and exporting databases on Drupal sites.
- DB dumps exclude cache, history and watchdog and sessions tables.
- Option to import and export with compression (gzip).
Run this command in your project root to install the package:
composer require xenyo/dbtools
All commands must be run from the project root.
composer exec dbe [file]
Exports the database to the given file. Defaults to database.sql
.
composer exec dbi [file]
Drops existing database and imports the database from the given file. Defaults to database.sql
.
composer exec dbez [file]
Exports the database to the given file. Defaults to database.sql.gz
.
composer exec dbiz [file]
Drops existing database and imports the database from the given file. Defaults to database.sql.gz
.