antihero/mount-last-db-bundle

Symfony bundle to mount last .gz sql dump from remote SMB/SFTP server. Commands to dump or mount current DB, and to copy current DB to test DB.

Installs: 112

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

Type:symfony-bundle

0.3.3 2024-07-15 16:17 UTC

This package is auto-updated.

Last update: 2024-11-14 18:29:42 UTC


README

Symfony bundle to:

  • mount last .gz sql dump from remote SMB or FTPS server and execute it. Optional schema drop (doctrine: schema: drop --force) and migration execution (d:m:m)
  • copy current database to test database. Test DB name is set by curDbName + dbSuffix. Bette to use same db suffix as in doctrine.yaml when@test.
  • dump or mount local database

    Install

composer require antihero/mount-last-db-bundle

Config

mount_last_db:
    srv_type: ftps|smb
    dest_dir: _dump (relative to project root)
    file_filter: lhyo_ocf
    srv_uri: 192.168.0.92
    srv_path: backups
    srv_user: USER
    srv_pwd: PASS
    srv_share: mysql_backups (only for smb)
    srv_workgroup: workgroup (only for smb)
php bin/console debug:config mount_last_db

Usage

php bin/console ah:mount-last-db
php bin/console ah:mount-db
php bin/console ah:dump-db
php bin/console ah:copy-db-to-test DBSUFFIX