PDA

View Full Version : remote backup fails on socket-copy of replication files only



bloyall
November 19th, 2008, 02:50 PM
I have a RH 5.x server running mysql-zrm 2.0 community trying to backup replication slaves running on OSX 10.4 (please, do not ask :mad:)

In short, the backup of the database succeeds, but the replication files fail with copy-plugin exited with error 512

Please be aware, due to the different OSs (and politics) there is a UID/GID mismatch between the machines 74/74 on the OSX side and 27/27 on the RH side. Given that the database itself transfers across the link, can this be discounted?

I am using the following config:

comment=This backs up xxxxxxx, port 3307, originally cirrus dbs
backup-level=0
backup-mode=logical
destination=/var/lib/mysql-zrm
retention-policy=10D
replication=1
compress=1
compress-plugin=/usr/bin/gzip
all-databases=1
user="dba-backup"
password="xxxxxxx"
host="yyyyyyyyyy.$$$.xxxx.###"
port=3307
routines=1
mysql-binpath="/usr/bin"
mysql-binlog-path="/usr/local/mysql/cirrus_data"
verbose=1
mailto="root@localhost"
copy-plugin=/usr/share/mysql-zrm/plugins/socket-copy.pl

Here is the verbose output of a run:

[root@mountlohtse mysql-zrm]# mysql-zrm-scheduler --now --backup-set fuji-3307 --backup-level 0
schedule:INFO: ZRM for MySQL Community Edition - version 2.0
Logging to /var/log/mysql-zrm/mysql-zrm-scheduler.log
backup:INFO: ZRM for MySQL Community Edition - version 2.0
fuji-3307:backup:INFO: START OF BACKUP
fuji-3307:backup:INFO: PHASE START: Initialization
fuji-3307:backup:INFO: Mail address: root@localhost is ok
fuji-3307:backup:INFO: ZRM Temporary configuration file = /etc/mysql-zrm/fuji-3307/tmpR0xfS.conf
fuji-3307:backup:INFO: {
fuji-3307:backup:INFO: verbose=1
fuji-3307:backup:INFO: retention-policy=10D
fuji-3307:backup:INFO: mysql-binpath=/usr/bin
fuji-3307:backup:INFO: all-databases=1
fuji-3307:backup:INFO: destination=/var/lib/mysql-zrm
fuji-3307:backup:INFO: routines=1
fuji-3307:backup:INFO: password=******
fuji-3307:backup:INFO: backup-mode=logical
fuji-3307:backup:INFO: compress-plugin=/usr/bin/gzip
fuji-3307:backup:INFO: user=dba-backup
fuji-3307:backup:INFO: copy-plugin=/usr/share/mysql-zrm/plugins/socket-copy.pl
fuji-3307:backup:INFO: quiet=0
fuji-3307:backup:INFO: backup-level=0
fuji-3307:backup:INFO: replication=1
fuji-3307:backup:INFO: mailto=root@localhost
fuji-3307:backup:INFO: port=3307
fuji-3307:backup:INFO: host=****deleted****
fuji-3307:backup:INFO: comment=This backs up ****deleted****, port 3307, originally cirrus dbs
fuji-3307:backup:INFO: compress=/usr/bin/gzip
fuji-3307:backup:INFO: mysql-binlog-path=/usr/local/mysql/cirrus_data
fuji-3307:backup:INFO: }
fuji-3307:backup:INFO: Getting mysql variables
fuji-3307:backup:INFO: "/usr/bin"/mysqladmin --user="dba-backup" --password="*****" --host="****deleted****" --port="3307" variables
fuji-3307:backup:INFO: datadir is /usr/local/mysql/cirrus_data/
fuji-3307:backup:INFO: mysql_version is 5.0.45-log
fuji-3307:backup:INFO: InnoDB data file are /usr/local/mysql/cirrus_data/ibdata1
fuji-3307:backup:INFO: InnoDB log dir is /usr/local/mysql/cirrus_data/.
fuji-3307:backup:INFO: backup set being used is fuji-3307
fuji-3307:backup:INFO: backup-set=fuji-3307
fuji-3307:backup:INFO: backup-date=20081119181207
fuji-3307:backup:INFO: mysql-server-os=Linux/Unix
fuji-3307:backup:INFO: host=****deleted****
fuji-3307:backup:INFO: backup-date-epoch=1227136327
fuji-3307:backup:INFO: retention-policy=10D
fuji-3307:backup:INFO: mysql-zrm-version=ZRM for MySQL Community Edition - version 2.0
fuji-3307:backup:INFO: mysql-version=5.0.45-log
fuji-3307:backup:INFO: backup-directory=/var/lib/mysql-zrm/fuji-3307/20081119181207
fuji-3307:backup:INFO: comment=This backs up ****deleted****, port 3307, originally cirrus dbs
fuji-3307:backup:INFO: backup-level=0
fuji-3307:backup:INFO: backup-mode=logical
fuji-3307:backup:INFO: PHASE END: Initialization
fuji-3307:backup:INFO: PHASE START: Running pre backup plugin
fuji-3307:backup:INFO: Executing pre-backup-plugin
fuji-3307:backup:INFO: PHASE END: Running pre backup plugin
fuji-3307:backup:INFO: Checking if this is a replication slave using command
fuji-3307:backup:INFO: "/usr/bin"/mysql --user="dba-backup" --password="*****" --host="****deleted****" --port="3307" -e "show slave status"
fuji-3307:backup:INFO: PHASE START: Stopping slave
fuji-3307:backup:INFO: Stoping slave using command
fuji-3307:backup:INFO: "/usr/bin"/mysqladmin --user="dba-backup" --password="*****" --host="****deleted****" --port="3307" stop-slave > /tmp/bU3t0uMFBF
fuji-3307:backup:INFO: Output of command: 'mysqladmin' is {
Slave stopped
}
fuji-3307:backup:INFO: PHASE END: Stopping slave
fuji-3307:backup:INFO: PHASE START: Flushing logs
fuji-3307:backup:INFO: Flushing the logs
fuji-3307:backup:INFO: "/usr/bin"/mysqladmin --user="dba-backup" --password="*****" --host="****deleted****" --port="3307" flush-logs
fuji-3307:backup:INFO: Getting master logname using command "/usr/bin"/mysql --user="dba-backup" --password="*****" --host="****deleted****" --port="3307" -e "show master status"
fuji-3307:backup:INFO: PHASE END: Flushing logs
fuji-3307:backup:INFO: PHASE START: Copying replication data
fuji-3307:backup:INFO: Backing up master.info
close of pipe failed
fuji-3307:backup:ERROR: Could not copy file /usr/local/mysql/cirrus_data/master.info
fuji-3307:backup:ERROR: copy-plugin exited with error 512
fuji-3307:backup:ERROR: Error backing up master.info
fuji-3307:backup:INFO: Backing up relay-log.info
close of pipe failed
fuji-3307:backup:ERROR: Could not copy file /usr/local/mysql/cirrus_data/relay-log.info
fuji-3307:backup:ERROR: copy-plugin exited with error 512
fuji-3307:backup:ERROR: Error backing up relay-log.info
close of pipe failed
fuji-3307:backup:ERROR: Could not copy file /var/tmp/SQL_LOAD*
fuji-3307:backup:ERROR: copy-plugin exited with error 512
Use of uninitialized value in concatenation (.) or string at /usr/lib/mysql-zrm/ZRM/Replication.pm line 99.
fuji-3307:backup:ERROR: Error backing up
fuji-3307:backup:INFO:
fuji-3307:backup:INFO: PHASE END: Copying replication data
fuji-3307:backup:INFO: PHASE START: Creating logical backup
fuji-3307:backup:INFO: Getting list of Databases
fuji-3307:backup:INFO: "/usr/bin"/mysql --user="dba-backup" --password="*****" --host="****deleted****" --port="3307" -e "show databases;"
fuji-3307:backup:INFO: Command used for logical backup is "/usr/bin"/mysqldump --opt --extended-insert --single-transaction --create-options --default-character-set=utf8 --routines --master-data=2 --user="dba-backup" --password="*****" --host="****deleted****" --port="3307" --all-databases > "/var/lib/mysql-zrm/fuji-3307/20081119181207/backup.sql"
fuji-3307:backup:INFO: Logical backup done for the following database(s)
list of DBs ****deleted****
fuji-3307:backup:INFO: logical-databases=list of DBs ****deleted****
fuji-3307:backup:INFO: PHASE END: Creating logical backup
fuji-3307:backup:INFO: PHASE START: Starting slave
fuji-3307:backup:INFO: Restarting slave using command
fuji-3307:backup:INFO: "/usr/bin"/mysqladmin --user="dba-backup" --password="*****" --host="****deleted****" --port="3307" start-slave > /tmp/bU3t0uMFBF

fuji-3307:backup:INFO: Output of command: 'mysqladmin' is {
Slave started
}
fuji-3307:backup:INFO: PHASE END: Starting slave
fuji-3307:backup:INFO: PHASE START: Calculating backup size & checksums
fuji-3307:backup:INFO: next-binlog=****deleted****-bin2.000017
fuji-3307:backup:INFO: last-backup=/var/lib/mysql-zrm/fuji-3307/20081119173937
fuji-3307:backup:INFO: backup-size=839.36 MB
fuji-3307:backup:INFO: PHASE END: Calculating backup size & checksums
fuji-3307:backup:INFO: PHASE START: Compression/Encryption
fuji-3307:backup:INFO: Compressing backup
fuji-3307:backup:INFO: Command used is 'tar --same-owner -cpsC "/var/lib/mysql-zrm/fuji-3307/20081119181207" --exclude=backup-data --exclude=index --exclude=zrm_checksum --exclude=backup-sql . 2>/tmp/r8hurhAI9Y | "/usr/bin/gzip" 2>/tmp/yg2ER6bifa > "/var/lib/mysql-zrm/fuji-3307/20081119181207/backup-data" 2>/tmp/bU3t0uMFBF'
fuji-3307:backup:INFO: compress=/usr/bin/gzip
fuji-3307:backup:INFO: backup-size-compressed=141.73 MB
fuji-3307:backup:INFO: Removing all of the uncompressed/unencrypted data
fuji-3307:backup:INFO: PHASE END: Compression/Encryption
fuji-3307:backup:INFO: read-locks-time=00:03:58
fuji-3307:backup:INFO: flush-logs-time=00:00:00
fuji-3307:backup:INFO: compress-encrypt-time=21:27:18
fuji-3307:backup:INFO: backup-time=00:05:57
fuji-3307:backup:INFO: backup-status=Backup done but with errors
fuji-3307:backup:INFO: Backup done but with errors
fuji-3307:backup:INFO: PHASE START: Running post backup plugin
fuji-3307:backup:INFO: Executing post-backup-plugin
fuji-3307:backup:INFO: PHASE END: Running post backup plugin
fuji-3307:backup:INFO: PHASE START: Mailing backup report
fuji-3307:backup:INFO: mailing file /tmp/s3QxK2PJeo
fuji-3307:backup:INFO: mail command is cat "/tmp/s3QxK2PJeo"|mail -s "[ZRM for MySQL Report] backup-set fuji-3307" root@localhost
fuji-3307:backup:INFO: PHASE END: Mailing backup report
fuji-3307:backup:INFO: PHASE START: Cleanup
fuji-3307:backup:INFO: mailing file /tmp/uXw84AkNPl
fuji-3307:backup:INFO: mail command is cat "/tmp/uXw84AkNPl"|mail -s "[ZRM for MySQL Report] ERROR during backup of backup-set fuji-3307" root@localhost
fuji-3307:backup:INFO: PHASE END: Cleanup
fuji-3307:backup:INFO: END OF BACKUP

Any help out there?

tia,

ben

zmanda_jacob
November 19th, 2008, 03:28 PM
The UID and GID mismatch is what is causing the 512 copy plugin error. Is it possible for you to resolve that?

bloyall
November 19th, 2008, 03:40 PM
That will be tough. Can you say that is almost assuredly the problem? Any other possible work around? I'm kinda stuck with the 10.4 boxes for a while. Although this would be yet another thing to push for getting on some newer hardware.....

ben

zmanda_jacob
November 20th, 2008, 01:04 PM
I'm certain that is the reason why it is failing for that, but do you get different results with the SSH plugin?

zmanda_jacob
November 21st, 2008, 07:17 AM
After speaking with someone in engineering, it is a requirement that the UID and GID match, regardless of what plugin you use.