sidus/database-maintenance-bundle

Simple database maintenance with Doctrine and MySQL

v2.0.0 2021-02-24 05:01 UTC

This package is auto-updated.

Last update: 2024-01-24 11:28:13 UTC


README

This bundle allows you to execute mysql and mysqldump commands without passing any authentication parameters, il will automatically uses the one declared in doctrine.

Dumping local database:

$ bin/console sidus:database:mysqldump > dump.sql

Dumping remote database to local file:

$ ssh username@host "/path/to/symfony/bin/console sidus:database:mysqldump" > dump.sql

Copying remote database to local:

$ ssh username@host "/path/to/symfony/bin/console sidus:database:mysqldump" | bin/console sidus:database:mysql

Copying local database to remote:

$ bin/console sidus:database:mysqldump | ssh username@host "/path/to/symfony/bin/console sidus:database:mysql"