Re: transfer mysqldump backup via SSH
Posted by:
Benny Pei
Date: March 26, 2006 06:09PM
Machine_A: mysql_box
Machine_B: local_box where you want to keep the mysqldump files
you need to do one thing. Setup a one way ssh passphrase-less connection from mysql@Machine_A -> root@Machine_B (ie when mysql user from Machine A connect to Machine B as a root user, the ssh session is trusted) How to set this up? Talk to your sysadmin. But I think having a passphraseless to a root user is probably not a good idea. Anyway, if that is what you want, be aware of the security risk.
Once the passphrase less connection is set, test it
login to Machine_A as mysql
ssh to Machine_B as root
e.g.
mysql% ssh root@Machine_B
root%
This should connect to Machine_B and you are root once you are logged in.
So test is good. If that fails, go back and check your ssh passphrase between Machine_A and Machine_B
So all of this is set,
save mysqldump command into a shell script
In the shell script, after the mysqldump is done
add `scp file.sql root@Machine_B:/localdir/file.sql`
that is it.
Subject
Views
Written By
Posted
16716
March 21, 2006 06:39PM
7208
March 26, 2006 03:13PM
Re: transfer mysqldump backup via SSH
10190
March 26, 2006 06:09PM
6100
April 13, 2006 11:25AM
8112
April 14, 2006 08:49AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.