PDA

View Full Version : remote backup restore failed due to could not delete



joon321
April 20th, 2008, 11:46 PM
I am restoring full logical backup set remotely however fails to restore completely

[root@backup remotebackup]# mysql-zrm --action restore --backup-set remotebackup --source-directory /var/lib/mysql-zrm/remotebackup/20080420012652/
restore:INFO: ZRM for MySQL Community Edition - version 2.0
remotebackup:restore:WARNING: The lvm-snapshot option is deprecated. Use snapshot-size instead
remotebackup:restore:INFO: Mail address: admin@junipro.com is ok
remotebackup:restore:INFO: ZRM Temporary configuration file = /etc/mysql-zrm/remotebackup/tmpKGMAL.conf
remotebackup:restore:INFO: {
remotebackup:restore:INFO: verbose=1
remotebackup:restore:INFO: retention-policy=10D
remotebackup:restore:INFO: tmpdir=/tmp
remotebackup:restore:INFO: destination=/var/lib/mysql-zrm
remotebackup:restore:INFO: socket-remote-port=25300
remotebackup:restore:INFO: source-directory=/var/lib/mysql-zrm/remotebackup/20080420012652/
remotebackup:restore:INFO: password=******
remotebackup:restore:INFO: backup-mode=logical
remotebackup:restore:INFO: snapshot-plugin=/usr/share/mysql-zrm/plugins/lvm-snapshot.pl
remotebackup:restore:INFO: user=root
remotebackup:restore:INFO: copy-plugin=/usr/share/mysql-zrm/plugins/socket-copy.pl
remotebackup:restore:INFO: backup-level=0
remotebackup:restore:INFO: lvm-snapshot=10M
remotebackup:restore:INFO: mailto=admin@junipro.com
remotebackup:restore:INFO: databases=world
remotebackup:restore:INFO: port=3306
remotebackup:restore:INFO: host=192.168.1.102
remotebackup:restore:INFO: snapshot-size=10M
remotebackup:restore:INFO: compress=
remotebackup:restore:INFO: mysql-binlog-path=/var/run/mysqld
remotebackup:restore:INFO: }
remotebackup:restore:INFO: Getting mysql variables
remotebackup:restore:INFO: mysqladmin --user="root" --password="*****" --host="192.168.1.102" --port="3306" variables
remotebackup:restore:INFO: datadir is /var/lib/mysql/
remotebackup:restore:INFO: mysql_version is 5.0.45-log
remotebackup:restore:INFO: InnoDB data file are /var/lib/mysql/ibdata1
remotebackup:restore:INFO: InnoDB log dir is /var/lib/mysql/.
remotebackup:restore:INFO: Command used is 'cat "/var/lib/mysql-zrm/remotebackup/20080420012652/backup-data" | gzip -d | tar --same-owner -xpsC "/var/lib/mysql-zrm/remotebackup/20080420012652/" 2>/tmp/krSb3dsy4l'
remotebackup:restore:INFO: restoring using command mysql --user="root" --password="*****" --host="192.168.1.102" --port="3306" -e "set character_set_client=utf8;set character_set_connection=utf8;set character_set_database=utf8;set character_set_results=utf8;set character_set_server=utf8;source /tmp/uLsnQ6zpT6;"
remotebackup:restore:INFO: Restored database(s) from logical backup: world
remotebackup:restore:INFO: Removing all of the uncompressed/unencrypted data
remotebackup:restore:ERROR: could not delete /var/lib/mysql-zrm/remotebackup/20080420012652
remotebackup:restore:ERROR: Restore failed

What am I doing wrong here? I am running as root user so I don't believe this is permission related. Any help is appreciated

Thanks,

kkg
April 21st, 2008, 12:19 AM
I am restoring full logical backup set remotely however fails to restore completely

[root@backup remotebackup]# mysql-zrm --action restore --backup-set remotebackup --source-directory /var/lib/mysql-zrm/remotebackup/20080420012652/
restore:INFO: ZRM for MySQL Community Edition - version 2.0
remotebackup:restore:WARNING: The lvm-snapshot option is deprecated. Use snapshot-size instead
remotebackup:restore:INFO: Mail address: admin@junipro.com is ok
remotebackup:restore:INFO: ZRM Temporary configuration file = /etc/mysql-zrm/remotebackup/tmpKGMAL.conf
remotebackup:restore:INFO: {
remotebackup:restore:INFO: verbose=1
remotebackup:restore:INFO: retention-policy=10D
remotebackup:restore:INFO: tmpdir=/tmp
remotebackup:restore:INFO: destination=/var/lib/mysql-zrm
remotebackup:restore:INFO: socket-remote-port=25300
remotebackup:restore:INFO: source-directory=/var/lib/mysql-zrm/remotebackup/20080420012652/
remotebackup:restore:INFO: password=******
remotebackup:restore:INFO: backup-mode=logical
remotebackup:restore:INFO: snapshot-plugin=/usr/share/mysql-zrm/plugins/lvm-snapshot.pl
remotebackup:restore:INFO: user=root
remotebackup:restore:INFO: copy-plugin=/usr/share/mysql-zrm/plugins/socket-copy.pl
remotebackup:restore:INFO: backup-level=0
remotebackup:restore:INFO: lvm-snapshot=10M
remotebackup:restore:INFO: mailto=admin@junipro.com
remotebackup:restore:INFO: databases=world
remotebackup:restore:INFO: port=3306
remotebackup:restore:INFO: host=192.168.1.102
remotebackup:restore:INFO: snapshot-size=10M
remotebackup:restore:INFO: compress=
remotebackup:restore:INFO: mysql-binlog-path=/var/run/mysqld
remotebackup:restore:INFO: }
remotebackup:restore:INFO: Getting mysql variables
remotebackup:restore:INFO: mysqladmin --user="root" --password="*****" --host="192.168.1.102" --port="3306" variables
remotebackup:restore:INFO: datadir is /var/lib/mysql/
remotebackup:restore:INFO: mysql_version is 5.0.45-log
remotebackup:restore:INFO: InnoDB data file are /var/lib/mysql/ibdata1
remotebackup:restore:INFO: InnoDB log dir is /var/lib/mysql/.
remotebackup:restore:INFO: Command used is 'cat "/var/lib/mysql-zrm/remotebackup/20080420012652/backup-data" | gzip -d | tar --same-owner -xpsC "/var/lib/mysql-zrm/remotebackup/20080420012652/" 2>/tmp/krSb3dsy4l'
remotebackup:restore:INFO: restoring using command mysql --user="root" --password="*****" --host="192.168.1.102" --port="3306" -e "set character_set_client=utf8;set character_set_connection=utf8;set character_set_database=utf8;set character_set_results=utf8;set character_set_server=utf8;source /tmp/uLsnQ6zpT6;"
remotebackup:restore:INFO: Restored database(s) from logical backup: world
remotebackup:restore:INFO: Removing all of the uncompressed/unencrypted data
remotebackup:restore:ERROR: could not delete /var/lib/mysql-zrm/remotebackup/20080420012652
remotebackup:restore:ERROR: Restore failed

What am I doing wrong here? I am running as root user so I don't believe this is permission related. Any help is appreciated

Thanks,

Is the backup contained in the source-directory a compressed backup?
Can you try after commenting out the compress option during restore?

--kkg

kkg
April 21st, 2008, 02:18 AM
Is the backup contained in the source-directory a compressed backup?
Can you try after commenting out the compress option during restore?

--kkg


Please ignore my previous response. I did not read your question in detail.

Could you give us the following details:
a) Which OS did you get this issue on?
b) Which version of Perl are you using?

--kkg

joon321
April 21st, 2008, 10:49 AM
yes it was a compressed backup so I commented out the compressed option and reran the restore and then it worked without any error. Why would it fail to delete the source directory when it's a compressed backup?

I am running perl version 5.8.8 and running both mysql and zmanda on fedora 7.

Thanks,

joon321
April 21st, 2008, 11:05 AM
Correction to my previous comment

I commented out the compressed option and reran the backup first and then using the uncompressed backup, I ran the restore and it worked without any error.

remotebackup:restore:INFO: restoring using command mysql --user="root" --password="*****" --host="192.168.1.102" --port="3306" -e "set character_set_client=utf8;set character_set_connection=utf8;set character_set_database=utf8;set character_set_results=utf8;set character_set_server=utf8;source /tmp/2P2XBxkjXP;"
remotebackup:restore:INFO: Restored database(s) from logical backup: world
remotebackup:restore:INFO: Restore done in 0 seconds.

No indication of deleting the source directory though

Why would the errors occur when restored using compressed backup? I would like the data to be compressed for production.

kkg
April 21st, 2008, 10:17 PM
Correction to my previous comment

I commented out the compressed option and reran the backup first and then using the uncompressed backup, I ran the restore and it worked without any error.

remotebackup:restore:INFO: restoring using command mysql --user="root" --password="*****" --host="192.168.1.102" --port="3306" -e "set character_set_client=utf8;set character_set_connection=utf8;set character_set_database=utf8;set character_set_results=utf8;set character_set_server=utf8;source /tmp/2P2XBxkjXP;"
remotebackup:restore:INFO: Restored database(s) from logical backup: world
remotebackup:restore:INFO: Restore done in 0 seconds.

No indication of deleting the source directory though

Try doing a restore using the following command

mysql-zrm --action restore --backup-set remotebackup --source-directory /var/lib/mysql-zrm/remotebackup/20080420012652

Note that the specified source-directory does not have a trailing slash.

Let me know if you still face the issue.
--kkg

joon321
April 22nd, 2008, 12:27 PM
Awesome! that was it

Thank you so much for looking into it

aankdavid
May 5th, 2008, 01:05 AM
bash-2.05# mysql-zrm --action restore --backup-set dailyrun --source-directory /david/mysql-zrm/backups/Dailyrun/20080505154022/
restore:INFO: ZRM for MySQL Community Edition - version 2.0
davrun:restore:WARNING: Binary logging is off.
ERROR 1193 (00000) at line 1: Unknown system variable 'character_set_client'
davrun:restore:ERROR: Restore from logical backup failed
davrun:restore:ERROR: Restore failed

how to fix this error?
thx

kkg
May 5th, 2008, 01:52 AM
bash-2.05# mysql-zrm --action restore --backup-set dailyrun --source-directory /david/mysql-zrm/backups/Dailyrun/20080505154022/
restore:INFO: ZRM for MySQL Community Edition - version 2.0
davrun:restore:WARNING: Binary logging is off.
ERROR 1193 (00000) at line 1: Unknown system variable 'character_set_client'
davrun:restore:ERROR: Restore from logical backup failed
davrun:restore:ERROR: Restore failed

how to fix this error?
thx

Which version of mysql was backed up and which version of MySQL are you trying to restore to?

--kkg

aankdavid
May 5th, 2008, 08:05 PM
Which version of mysql was backed up and which version of MySQL are you trying to restore to?

I backed up from version 4.0.20-max
and I trying to restore in MySQL version 5.0.18-log