Guest User

Untitled

a guest
Dec 27th, 2017
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. $db_local = Config::get('database.'.env('DB_CONNECTION', 'db_local'));
  2. $dump = "tmp.db";
  3. exec("mysqldump --user={$db_local['username']} --password='{$db_local['password']}' --host={$db_local['host']} {$db_local['database']} --ignore-table={$db['database']}.some_table > $dump");
  4. $db_remote = Config::get('database.'.env('DB_CONNECTION', 'db_remote'));
  5. 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