SSH...
To login and backup a database in one line:
Code:
mysqldump --password=[password] -h [hostname] -u [username] [databasename] > [backupfile.sql]
To restore a database in one line:
Code:
mysql --password=[password] -h [hostname] -u [username] [database_to_restore] < [backupfile]
I use the backup cmd in an automated backup script which saves the file then uploads the file to a backup server.