DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Mysql Dump To Another Server
// Using UNIX pipe concept one can dump database to another server securely using ssh protocol.
// All you need remote execution rights for the ‘dd’ command, over SSH.
mysqldump -u USERnAME -p'PASSWORD' YOUR-DATABASE-NAME | ssh user@remote.server.com "dd of=/mysql/$(date +'%d-%m-%y')"





