PDA

View Full Version : Anyone worked on remote mysql server incremental backup by using Zrm package



lakshmi
September 17th, 2007, 06:57 AM
Can any one know the site which has complete documentation of remote mysql server incremental backup by using Zrm package. If so please send me the link. I referred Mysql Zrm manual but I have doubt in some points. So if any one have did already or the clear documentation is available, then please do let me know. For incremental remote server backup either SSH based copy plugin or the socket based copy plugin can be configured, can you give me example.

paddy
September 17th, 2007, 09:24 AM
Can any one know the site which has complete documentation of remote mysql server incremental backup by using Zrm package. If so please send me the link. I referred Mysql Zrm manual but I have doubt in some points. So if any one have did already or the clear documentation is available, then please do let me know. For incremental remote server backup either SSH based copy plugin or the socket based copy plugin can be configured, can you give me example.


Please take a look at http://mysqlbackup.zmanda.com/index.php/Backup_of_Remote_Servers#Raw_Backups_and_Increment al_Backups

Paddy

lakshmi
September 18th, 2007, 01:04 AM
I saw the page you have sent. I have a doubt because I saw Incremental backups of remote MySQL server is not supported at this page http://mysqlbackup.zmanda.com/index.php/Finally%2C_Can_I_do_MySQL_backups%3F#Scheduling_ba ckup_runs under incremental backups. But in the link you has given, they are telling the ways for incremental remote backup. Thats why I would like tp confirm whether it is possible or not. Please let me know the status.

Also, if incremental backup of remote mysql server is possible then I would like to know whether I want to install any extra package for copy plugin or simply specifying copy plugin in configuration file is enough?

Sachin
September 18th, 2007, 02:25 AM
You are referring to documentation of older version.

For latest version, Please refer -
http://mysqlbackup.zmanda.com/index.php/Backup_of_Remote_Servers

Thanks,
Sachin

lakshmi
September 18th, 2007, 06:52 AM
Thanks, So we can able to do incremental backup of remote mysql server by using Mysql Zrm package. I think we want to enable copy plugin as well as ssl, whether these are necessary for incremental backup of remote mysql server. Whether any packages need to install for enabling copy plugin and ssl option?

Sachin
September 18th, 2007, 09:38 PM
Please look at:
http://mysqlbackup.zmanda.com/index.php/Copy_Plugin

Other help is also present at
http://mysqlbackup.zmanda.com.

Thanks,
Sachin

lakshmi
September 19th, 2007, 07:10 AM
I saw the link, in that if we want to use socket copy plugin then we need to install package MySQL-zrm-socket-server but I am trying to use ssh-plugin. I am getting error, when I try to run the below command from zrm installed mysql server for backing up remote mysql server in logical mode and backup level 0. I thought of doing first backup level as 0 and then 1.

mysql-zrm --action backup --backup-set 10.0.0.95_backup --databases vc_01
INFO: ZRM for MySQL Community Edition - version 1.1
ERROR: Unable to find copy plugin /etc/mysql-zrm/plugins/ssh-plugin.pl

How can I configure copy-plugin, I am using Mysql-zrm-1.1-1.noarch.rpm package?. I included copy-plugin in config file as
copy-plugin="/etc/mysql-zrm/plugins/ssh-plugin.pl", I left remaining remote-mysql-binpath and ssh-user as default.

Sachin
September 20th, 2007, 10:44 PM
Please check the following files are present -

/usr/share/mysql-zrm/plugins/ssh-copy.pl
/usr/share/mysql-zrm/plugins/socket-copy.pl

modify config file
for e.g
copy-plugin="/usr/share/mysql-zrm/plugins/ssh-copy.pl"

-sachin

lakshmi
September 21st, 2007, 04:38 AM
I checked but those files are not present. I saw copy-plugin.pl in /etc/mysql-zrm/plugin-templates/socket and /etc/mysql-zrm/plugin-templates/ssh. I saw README file, if I want to take incremental remote backup whether I should follow those instructions in README file(copy plugin) in Remote mysql server or local Zrm mysql machine.

Also I tried mysql-zrm --action --abort-backup --backup-set dailyrun --databases test_backup for aborting backup, but this option was available in mysql-zrm. Options available are /usr/bin/mysql-zrm --action <backup|restore|list|purge|parse-binlogs|check|verify-backup|extract-backup>

can you suggest me what to do.

Sachin
September 21st, 2007, 04:46 AM
It seems that you are not using latest version.
Please Download latest version from -

http://www.zmanda.com/download-zrm.php

-sachin

lakshmi
September 22nd, 2007, 07:29 AM
Thanks I downloaded and installed new version 1.2-1, one error i am getting.

First I took full backup of remote mysql server and then I took incremental backup after modifying the particular database. Both backups was proper but I shut down the system. While doing shut down I got message some thing regarding xinetd service.

After switch on the system I restored full backup, then checked and it was success. Next restored incremental backup, it also success but whille checking database what modification I did after full backup was not there but backup was success. What is the reason for it?

So again I tried to take incremental backup but that time I got error like below.

# mysql-zrm --action backup --backup-set 10.0.0.95_backup --databases test_01 --backup-level 1 --host 10.0.0.95
backup:INFO: ZRM for MySQL Community Edition - version 1.2
10.0.0.95_backup:backup:INFO: Using /usr/share/mysql-zrm/plugins/lvm-snapshot.pl as the default plugin since snapshot-plugin has not been specified
10.0.0.95_backup:backup:INFO: ZRM Temporary configuration file = /etc/mysql-zrm/10.0.0.95_backup/tmpbpRsS.conf
10.0.0.95_backup:backup:INFO: {
10.0.0.95_backup:backup:INFO: verbose=1
10.0.0.95_backup:backup:INFO: retention-policy=10D
10.0.0.95_backup:backup:INFO: backup-level=1
10.0.0.95_backup:backup:INFO: destination=/var/lib/mysql-zrm
10.0.0.95_backup:backup:INFO: databases=test_01
10.0.0.95_backup:backup:INFO: host=10.0.0.95
10.0.0.95_backup:backup:INFO: snapshot-plugin=/usr/share/mysql-zrm/plugins/lvm-snapshot.pl
10.0.0.95_backup:backup:INFO: backup-mode=logical
10.0.0.95_backup:backup:INFO: password=******
10.0.0.95_backup:backup:INFO: user=remote-user
10.0.0.95_backup:backup:INFO: copy-plugin=/usr/share/mysql-zrm/plugins/socket-copy.pl
10.0.0.95_backup:backup:INFO: }
10.0.0.95_backup:backup:INFO: Getting mysql variables
10.0.0.95_backup:backup:INFO: mysqladmin --user="remote-user" --password="*****" --host="10.0.0.95" variables
10.0.0.95_backup:backup:INFO: datadir is /var/lib/mysql/
10.0.0.95_backup:backup:INFO: mysql_version is 5.0.18-Max-log
10.0.0.95_backup:backup:INFO: log_bin=ON
10.0.0.95_backup:backup:INFO: InnoDB data file are /var/lib/mysql/ibdata1
10.0.0.95_backup:backup:INFO: InnoDB log dir is /var/lib/mysql/.
10.0.0.95_backup:backup:INFO: backup set being used is 10.0.0.95_backup
10.0.0.95_backup:backup:INFO: backup-set=10.0.0.95_backup
10.0.0.95_backup:backup:INFO: backup-date=20070923114631
10.0.0.95_backup:backup:INFO: host=10.0.0.95
10.0.0.95_backup:backup:INFO: backup-date-epoch=1190528191
10.0.0.95_backup:backup:INFO: retention-policy=10D
10.0.0.95_backup:backup:INFO: mysql-zrm-version=ZRM for MySQL Community Edition - version 1.2
10.0.0.95_backup:backup:INFO: mysql-version=5.0.18-Max-log
10.0.0.95_backup:backup:INFO: backup-directory=/var/lib/mysql-zrm/10.0.0.95_backup/20070923114631
10.0.0.95_backup:backup:INFO: Executing pre-backup-plugin
10.0.0.95_backup:backup:INFO: Flushing the logs
10.0.0.95_backup:backup:INFO: flush-logs
10.0.0.95_backup:backup:INFO: Getting master logname using command mysql --user="remote-user" --password="*****" --host="10.0.0.95" -e "show master status"
10.0.0.95_backup:backup:INFO: backup-level=1
10.0.0.95_backup:backup:INFO: Getting list of binary logs using command mysql --user="remote-user" --password="*****" --host="10.0.0.95" -e "show master logs"
connect: Connection refused at /usr/share/mysql-zrm/plugins/socket-copy.pl line 206.
10.0.0.95_backup:backup:ERROR: Could not copy file /var/lib/mysql/mysql-bin.000035
10.0.0.95_backup:backup:ERROR: copy-plugin exited with error 28416
10.0.0.95_backup:backup:ERROR: Could not copy bin log file mysql-bin.000035
connect: Connection refused at /usr/share/mysql-zrm/plugins/socket-copy.pl line 206.
10.0.0.95_backup:backup:ERROR: Could not copy file /var/lib/mysql/mysql-bin.000036
10.0.0.95_backup:backup:ERROR: copy-plugin exited with error 28416
10.0.0.95_backup:backup:ERROR: Could not copy bin log file mysql-bin.000036
10.0.0.95_backup:backup:INFO: incremental=mysql-bin.[0-9]*
10.0.0.95_backup:backup:INFO: next-binlog=mysql-bin.000037
10.0.0.95_backup:backup:INFO: last-backup=/var/lib/mysql-zrm/10.0.0.95_backup/20070923030002
10.0.0.95_backup:backup:INFO: backup-size=0.00 MB
10.0.0.95_backup:backup:INFO: read-locks-time=00:00:00
10.0.0.95_backup:backup:INFO: flush-logs-time=00:00:00
10.0.0.95_backup:backup:INFO: backup-time=00:00:01
10.0.0.95_backup:backup:INFO: backup-status=Backup done but with errors
10.0.0.95_backup:backup:INFO: Backup done but with errors
10.0.0.95_backup:backup:INFO: Executing post-backup-plugin

I saw that if we uncomment the TMPDIR environment variable in /usr/share/mysql-zrm/plugins/ socket-copy.pl then we wont get like that. But I got same error after doing also. Can you able to suggest me.

Sachin
September 26th, 2007, 01:14 AM
If you are getting 'connection refused' that means you have not started xinetd on remote machine.
Please verify xinetd status on remote machine and ensure mysql-zrm port - 25300 is open.

-sachin.

lakshmi
September 27th, 2007, 01:48 AM
Ya Thanks. I restarted already and it was working well now.