Results 1 to 10 of 10

Thread: remote backup restore failed due to could not delete

  1. #1

    Default remote backup restore failed due to could not delete

    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: [email]admin@junipro.com[/email] 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,

  2. #2
    Join Date
    Oct 2006
    Posts
    199

    Default

    Quote Originally Posted by joon321 View Post
    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: [email]admin@junipro.com[/email] 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

  3. #3
    Join Date
    Oct 2006
    Posts
    199

    Default

    Quote Originally Posted by kkg View Post
    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

  4. #4

    Default

    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,

  5. #5

    Default

    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.
    Last edited by joon321; April 21st, 2008 at 11:50 PM.

  6. #6
    Join Date
    Oct 2006
    Posts
    199

    Default

    Quote Originally Posted by joon321 View Post
    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

  7. #7

    Default

    Awesome! that was it

    Thank you so much for looking into it

  8. #8
    Join Date
    Apr 2008
    Location
    jakarta, indonesia
    Posts
    14

    Default Restore from logical backup failed

    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

  9. #9
    Join Date
    Oct 2006
    Posts
    199

    Default

    Quote Originally Posted by aankdavid View Post
    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

  10. #10
    Join Date
    Apr 2008
    Location
    jakarta, indonesia
    Posts
    14

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •