3 October 2008 0 Comments

Running mysqldump via ssh (direct host to host copy)

In order to run a mysqldump from one host to another over SSH you can run:

mysqldump dbname | ssh root@remotehost.com "mysql -D dbname"

This will pipe the output of mysqldump directly to the ssh connection which is running MySQL at the other end and receiving the mysqldump from standard input.

Leave a Reply