PDA

View Full Version : mysql-zrm don't working with incremental backup



slackman
October 8th, 2010, 01:23 AM
[Backup Server 203.x.x.1] <-----> [Web server 203.x.x.2]


###mysql-zrm.conf

backup-level=0
backup-mode=logical
retention-policy=10D
compress=1
all-databases=1
user="mysqlxxx"
password="mysqlbackupxxx"
host="203.x.x.2"
verbose=1
mailto="slackxxx@xxxxl.com"

#############


###my.cnf####
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
log-bin
[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

###########

this configuration working for full mysql backup
mysql-zrm-scheduler --now --backup-set webserver --backup-level 0





but i use this command for incremental backup
mysql-zrm-scheduler --now --backup-set webserver --backup-level 1

system call mysql password ????

#### this error ######
webserver:backup:INFO: PHASE END: Flushing logs
webserver:backup:INFO: PHASE START: Creating incremental backup
webserver:backup:INFO: Getting list of binary logs using command mysql --user="mysqlbackup" --password="*****" --host="203.x.x.2" -e "show master logs"
src = /var/log/mysql/WebServer-bin.000027
k = /var/lib/mysql-zrm/webserver/20101008162239/WebServer-bin.000027
mysql@203.x.x.2's password:


i don't know why


anyone help me


thank you for advance.!!

paddy
October 8th, 2010, 02:17 PM
mysql --user="mysqlbackup" --password="*****" --host="203.x.x.2" -e "show master logs"

should not ask for mysql user password. Can you run this command directly?

Do you have binary logging enabled on the MySQL server?

slackman
October 8th, 2010, 10:40 PM
After run you command

[root@Backup-Server 18files]# mysql --user="mysqlbackup" --password="123mysqlbackup" --host="203.x.x.2" -e "show master logs"
+-------------------+------------+
| Log_name | File_size |
+-------------------+------------+
| mysqld-bin.000001 | 1108499586 |
| mysqld-bin.000002 | 339073782 |
| mysqld-bin.000003 | 1106708895 |
| mysqld-bin.000004 | 1043997090 |
| mysqld-bin.000005 | 1099915783 |
| mysqld-bin.000006 | 1139216469 |
| mysqld-bin.000007 | 1074432830 |
| mysqld-bin.000008 | 1074399786 |
| mysqld-bin.000009 | 1079762912 |
| mysqld-bin.000010 | 1124543419 |
| mysqld-bin.000011 | 1073742015 |
| mysqld-bin.000012 | 1101931471 |
| mysqld-bin.000013 | 800754863 |
| mysqld-bin.000014 | 142 |
| mysqld-bin.000015 | 991 |
| mysqld-bin.000016 | 142 |
| mysqld-bin.000017 | 98 |
+-------------------+------------+


and i put "log-bin" in my.cnf

how to solve

slackman
October 8th, 2010, 10:47 PM
mysql> show grants for 'mysqlbackup'@'%';
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for mysqlbackup@% |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT SELECT, INSERT, UPDATE, CREATE, DROP, RELOAD, SHUTDOWN, ALTER, SUPER, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'mysqlbackup'@'%' IDENTIFIED BY PASSWORD '748180e03679bf4d' |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)

paddy
October 9th, 2010, 06:46 AM
Are you using sudo to execute mysql commands?

Paddy

slackman
October 9th, 2010, 08:14 AM
Are you using sudo to execute mysql commands?

Paddy

Yes Sir. i run this command with root user.

paddy
October 9th, 2010, 09:38 PM
This might be the problem. Can you run the mysql command (show master logs) as mysql user? I'm assuming that you are running ZRM as mysql user.

Paddy