PDA

View Full Version : mysql-zrm is not using ssh even when configured to do so



dmayer
June 5th, 2008, 07:12 PM
Hi,

I have mysql-zrm backing up a bunch of servers via mysqldump since about a year. Now I have some more servers whose mysql server cannot be reached externally. As far as I understood i can usee the ssh-copy plugin and do a mysqlhotcopy remotely to get the dump back through the ssh connection.

I do have a backup-set specific config file like this:



backup-mode=raw
user="zrmbackup"
password="password"
copy-plugin=/usr/share/mysql-zrm/plugins/ssh-copy.pl
ssh-user="zrmbackup"
host="servername"

I also tried several variations of this. For some reason, when I run the backup, it still uses mysqldump. Here is the output:




/usr/bin/mysql-zrm --action backup --backup-set server --backup-level 0 --verbose
backup:INFO: ZRM for MySQL Community Edition - version 2.0
backup:INFO: Reading options from file /etc/mysql-zrm/mysql-zrm.conf
server:backup:INFO: START OF BACKUP
server:backup:INFO: PHASE START: Initialization
server:backup:INFO: Reading options from file /etc/mysql-zrm/server/mysql-zrm.conf
server:backup:WARNING: Could not open file /etc/mysql-zrm/server/last_backup. No such file or directory
server:backup:INFO: Mail address: xxx@xxx.com is ok
server:backup:INFO: ZRM Temporary configuration file = /etc/mysql-zrm/server/tmp9Ohkn.conf
server:backup:INFO: {
server:backup:INFO: retention-policy=10W
server:backup:INFO: backup-level=0
server:backup:INFO: mailto=xxx@xxx.com
server:backup:INFO: all-databases=1
server:backup:INFO: destination=/var/lib/mysql-zrm
server:backup:INFO: routines=1
server:backup:INFO: ssh-user=zrmbackup
server:backup:INFO: remote-mysql-binpath=/usr/bin
server:backup:INFO: host=server
server:backup:INFO: html-report-directory=/var/www/mysql-zrm/reports/
server:backup:INFO: password=******
server:backup:INFO: backup-mode=raw
server:backup:INFO: compress-plugin=/bin/gzip
server:backup:INFO: compress=/bin/gzip
server:backup:INFO: user=zrmbackup
server:backup:INFO: copy-plugin=/usr/share/mysql-zrm/plugins/ssh-copy.pl
server:backup:INFO: }
server:backup:INFO: Getting mysql variables
server:backup:INFO: mysqladmin --user="zrmbackup" --password="*****" --host="server" variables
server:backup:ERROR: Output of command: 'mysqladmin --user="zrmbackup" --password="*****" --host="server" variables' is {
mysqladmin: connect to server at 'server' failed
error: 'Lost connection to MySQL server at 'reading initial communication packet', system error: 111'
}
server:backup:ERROR: Cannot connect to mysql server!
server:backup:INFO: PHASE START: Cleanup
server:backup:INFO: mailing file /tmp/KxWE1N8MDE
server:backup:INFO: mail command is cat "/tmp/KxWE1N8MDE"|mail -s "[ZRM for MySQL Report] ERROR during backup of backup-set server" xxx@xxx.com

server:backup:INFO: PHASE END: Cleanup


I changed the servername for privacy reasons. What am i doing wrong?

Thank you,
Daniel

kkg
June 5th, 2008, 10:41 PM
Hi,

I have mysql-zrm backing up a bunch of servers via mysqldump since about a year. Now I have some more servers whose mysql server cannot be reached externally. As far as I understood i can usee the ssh-copy plugin and do a mysqlhotcopy remotely to get the dump back through the ssh connection.

I do have a backup-set specific config file like this:



backup-mode=raw
user="zrmbackup"
password="password"
copy-plugin=/usr/share/mysql-zrm/plugins/ssh-copy.pl
ssh-user="zrmbackup"
host="servername"

I also tried several variations of this. For some reason, when I run the backup, it still uses mysqldump. Here is the output:




/usr/bin/mysql-zrm --action backup --backup-set server --backup-level 0 --verbose
backup:INFO: ZRM for MySQL Community Edition - version 2.0
backup:INFO: Reading options from file /etc/mysql-zrm/mysql-zrm.conf
server:backup:INFO: START OF BACKUP
server:backup:INFO: PHASE START: Initialization
server:backup:INFO: Reading options from file /etc/mysql-zrm/server/mysql-zrm.conf
server:backup:WARNING: Could not open file /etc/mysql-zrm/server/last_backup. No such file or directory
server:backup:INFO: Mail address: xxx@xxx.com is ok
server:backup:INFO: ZRM Temporary configuration file = /etc/mysql-zrm/server/tmp9Ohkn.conf
server:backup:INFO: {
server:backup:INFO: retention-policy=10W
server:backup:INFO: backup-level=0
server:backup:INFO: mailto=xxx@xxx.com
server:backup:INFO: all-databases=1
server:backup:INFO: destination=/var/lib/mysql-zrm
server:backup:INFO: routines=1
server:backup:INFO: ssh-user=zrmbackup
server:backup:INFO: remote-mysql-binpath=/usr/bin
server:backup:INFO: host=server
server:backup:INFO: html-report-directory=/var/www/mysql-zrm/reports/
server:backup:INFO: password=******
server:backup:INFO: backup-mode=raw
server:backup:INFO: compress-plugin=/bin/gzip
server:backup:INFO: compress=/bin/gzip
server:backup:INFO: user=zrmbackup
server:backup:INFO: copy-plugin=/usr/share/mysql-zrm/plugins/ssh-copy.pl
server:backup:INFO: }
server:backup:INFO: Getting mysql variables
server:backup:INFO: mysqladmin --user="zrmbackup" --password="*****" --host="server" variables
server:backup:ERROR: Output of command: 'mysqladmin --user="zrmbackup" --password="*****" --host="server" variables' is {
mysqladmin: connect to server at 'server' failed
error: 'Lost connection to MySQL server at 'reading initial communication packet', system error: 111'
}
server:backup:ERROR: Cannot connect to mysql server!
server:backup:INFO: PHASE START: Cleanup
server:backup:INFO: mailing file /tmp/KxWE1N8MDE
server:backup:INFO: mail command is cat "/tmp/KxWE1N8MDE"|mail -s "[ZRM for MySQL Report] ERROR during backup of backup-set server" xxx@xxx.com

server:backup:INFO: PHASE END: Cleanup


I changed the servername for privacy reasons. What am i doing wrong?

Thank you,
Daniel


The ssh copy plugin is only used for doing the actual copy of data. You still need to give mysql client utilities access to the mysql server since ZRM used mysql client utilities to intract with the mysql server for various tasks such as finding out its configuration etc.

--kkg