How transfer dump SQL out from SSH

After connect through your SSH

$ssh xxxx.com –l admin

Next dump out the sql data.

$mysqldump –-opt –q –h <db host> –-user=<db user> –-password=<db pass> <db name> > output.sql

Transfer the entire sql file either using wget or other method.

Then import back

$mysql –u<db user> –p<db pass> –h<db host> <db name> < output.sql

Advertisements