How can i use mysqldump to backup and restore database to a remote server?
Both have root access. I am using putty to perform this.
So far I tried the follo
mysqldump --user=username --password=pwd db_name | bzip2 -c > /backup_dir/db_name.sql.bz2
you can embed this part in a script, afterward you can use FTP to transfer to the other location.
To restore, you can
bzip2 -d db_name.sql.bz2 mysql --user=username --password=pwd db_name < db_name.sql