# 1.
# http://www.rogerobeid.com/2011/02/06/mysqldump-over-ssh/
ssh -C {ssh.user}@{remote_host} mysqldump -u {remote_dbuser} --password={remote_dbpassword} {remote_dbname} | mysql -u {local_dbuser} --password={local_dbpassword} -D {local_dbname}
# 2.
# http://spin.atomicobject.com/2011/08/08/remote-mysqldump-with-no-temp-files/
$ ssh me@remoteserver 'mysqldump -u user -psecret production_database | gzip -9' | gzip -d | mysql local_database
# 3.
# http://scratching.psybermonkey.net/2011/02/ssh-how-to-pipe-output-from-local-to.html
ssh user@example.com "mysqldump -u DB_username -pDB_password DB_name | gzip -c" > /local/dir/DB_backup.gz
# 4.
ssh -C root@xx.xx.xx.xx -p 22 'mysqldump -u morris --password=xxxxxx cvarti | gzip -c -9' | pv | gzip -d | mysql -u root --password=root -D cvarti;