<?php
require_once 'vendor/autoload.php';
use DelhiArpitPatel\LargeMysqlMigrator\MySQLMigrator;
// Quick backup for entire database
MySQLMigrator::quickBackup(
"localhost", // Host
"username", // Username
"password", // Password
"database_name", // Database name
"/backup/path" // Backup folder
);
<?php
require_once 'vendor/autoload.php';
use DelhiArpitPatel\LargeMysqlMigrator\MySQLMigrator;
// Quick restore from backup
MySQLMigrator::quickRestore(
"localhost", // Host
"username", // Username
"password", // Password
"database_name", // Database name
"/backup/path" // Backup folder path
);
<?php
require_once 'vendor/autoload.php';
use DelhiArpitPatel\LargeMysqlMigrator\MySQLMigrator;
// Instance API for more control
$migrator = new MySQLMigrator("localhost", "username", "password");
$migrator->backup("database_name", "/backup/path", ["bkp_logs"]); // skip patterns/tables
// ... later
$migrator->restore("/backup/path", "database_name");
This approach prevents: