mnib-dev / mysqldump
A PHP wrapper around mysqldump CLI utility.
v0.1.1
2022-11-20 11:26 UTC
Requires
- php: ^7.2.5 || ^8.0.2
- symfony/options-resolver: ^4.4 || ^5.3 || ^6.0
- symfony/process: ^4.4 || ^5.3 || ^6.0
Requires (Dev)
- mnib-dev/coding-standard: dev-master
Replaces
- mnib-dev/mysqldump-php: *
- mnib/mysqldump-php: *
This package is auto-updated.
Last update: 2025-03-24 19:34:18 UTC
README
chdir(__DIR__); $dump = new \MNIB\MysqlDump($dbname, $host, $port, $user, $password); // Create dump $dump->run([ 'mysqldump_bin' => '/usr/bin/mysqldump', 'file' => __DIR__ . '/dump.sql', 'archive' => __DIR__ . '/dump.sql.bz2', 'archive_pattern' => '/usr/bin/pbzip2 --compress --best -c %1$s > %2$s', 'defaults_extra_file' => __DIR__ . '/custom-my-file.cnf', 'max_allowed_packet' => '512M', 'dump_type' => null, // Valid options: null, "schema" or "data" 'selected_tables' => [ 'product', ], 'ignored_tables' => [ 'orders', ], ]);