xenyo/dbtools

Command line tools for importing and exporting databases for Drupal sites.

Maintainers

Details

github.com/xenyo/dbtools

Source

Issues

Installs: 216

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:Shell

v1.1 2023-08-22 09:45 UTC

This package is auto-updated.

Last update: 2025-07-22 14:18:02 UTC


README

Command line tools for importing and exporting databases on Drupal sites.

Features

  • DB dumps exclude cache, history and watchdog and sessions tables.
  • Option to import and export with compression (gzip).

Installation

Run this command in your project root to install the package:

composer require xenyo/dbtools

Commands

All commands must be run from the project root.

Export database

composer exec dbe [file]

Exports the database to the given file. Defaults to database.sql.

Import database

composer exec dbi [file]

Drops existing database and imports the database from the given file. Defaults to database.sql.

Export database (gzipped)

composer exec dbez [file]

Exports the database to the given file. Defaults to database.sql.gz.

Import database (gzipped)

composer exec dbiz [file]

Drops existing database and imports the database from the given file. Defaults to database.sql.gz.