Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $db_local = Config::get('database.'.env('DB_CONNECTION', 'db_local'));
- $dump = "tmp.db";
- exec("mysqldump --user={$db_local['username']} --password='{$db_local['password']}' --host={$db_local['host']} {$db_local['database']} --ignore-table={$db['database']}.some_table > $dump");
- $db_remote = Config::get('database.'.env('DB_CONNECTION', 'db_remote'));
- exec("mysql --user={$db_remote['username']} --password='{$db_remote['password']}' --host={$db_remote['host']} {$db_remote['database']} < $dump");
Add Comment
Please, Sign In to add comment