Announcement

Announcement Module
Collapse
No announcement yet.

XtraBackup fails with *.cnf Percona Configuration http://tools.percona.com/

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • XtraBackup fails with *.cnf Percona Configuration http://tools.percona.com/

    After using a percona optimized .cnf file the backup fails

    CNF:
    ----------------------
    # Generated by Percona Configuration Wizard (http://tools.percona.com/) version REL5-20120208

    [client]

    # CLIENT #
    port = 3306
    socket = /var/run/mysqld/mysqld.sock

    [mysqld]

    # GENERAL #
    user = mysql
    default_storage_engine = InnoDB
    pid_file = /var/run/mysqld/mysqld.pid
    socket = /var/run/mysqld/mysqld.sock
    basedir = /usr/local/mysql
    tmpdir = /tmp

    # MyISAM #
    key_buffer_size = 32M
    myisam_recover = FORCE,BACKUP

    # SAFETY #
    max_allowed_packet = 16M
    max_connect_errors = 1000000
    skip_name_resolve
    sql_mode = STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_ SUBSTITUTION
    sysdate_is_now = 1
    innodb = FORCE
    innodb_strict_mode = 1
    bind_address = 127.0.0.1

    # DATA STORAGE #
    datadir = /var/lib/mysql

    # BINARY LOGGING #
    log_bin = /var/lib/mysql/mysql-bin
    expire_logs_days = 14
    max_binlog_size = 100M
    sync_binlog = 1

    # CACHES AND LIMITS #
    tmp_table_size = 32M
    max_heap_table_size = 32M
    query_cache_type = 0
    query_cache_size = 0
    max_connections = 500
    thread_cache_size = 50
    open_files_limit = 65535
    table_definition_cache = 1024
    table_open_cache = 2048

    # INNODB #
    innodb_flush_method = O_DIRECT
    innodb_log_files_in_group = 2
    innodb_log_file_size = 256M
    innodb_flush_log_at_trx_commit = 2
    innodb_file_per_table = 1
    innodb_buffer_pool_size = 6G

    # LOGGING #
    log_error = /var/lib/mysql/mysql-error.log
    log_queries_not_using_indexes = 1
    slow_query_log = 1
    slow_query_log_file = /var/lib/mysql/mysql-slow.log


    lc_messages_dir = /opt/mysql/server-5.6/share/english


    LOG:
    ----------------------
    InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
    and Percona LLC and/or its affiliates 2009-2013. All Rights Reserved.

    This software is published under
    the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

    131210 11:53:50 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' as 'root' (using password: YES).
    131210 11:53:50 innobackupex: Connected to MySQL server
    IMPORTANT: Please check that the backup run completes successfully.
    At the end of a successful backup run innobackupex
    prints "completed OK!".

    innobackupex: Using mysql server version 5.6.14-log

    innobackupex: Created backup directory /var/www/dyntest.dk

    131210 11:53:50 innobackupex: Starting ibbackup with command: xtrabackup_56 --defaults-group="mysqld" --backup --suspend-at-end --target-dir=/tmp --tmpdir=/tmp --stream=tar
    innobackupex: Waiting for ibbackup (pid=6728) to suspend
    innobackupex: Suspend file '/tmp/xtrabackup_suspended_2'

    xtrabackup_56 version 2.1.5 for MySQL server 5.6.11 Linux (x86_64) (revision id: undefined)
    xtrabackup: uses posix_fadvise().
    xtrabackup: cd to /var/lib/mysql
    xtrabackup: using the following InnoDB configuration:
    xtrabackup: innodb_data_home_dir = ./
    xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
    xtrabackup: innodb_log_group_home_dir = ./
    xtrabackup: innodb_log_files_in_group = 2
    xtrabackup: innodb_log_file_size = 50331648
    InnoDB: Error: log file ./ib_logfile0 is of different size 268435456 bytes
    InnoDB: than specified in the .cnf file 50331648 bytes!
    innobackupex: Error: The xtrabackup child process has died at /usr/bin/innobackupex line 2579.

  • #2
    Hi,

    It gives error for log file size. Have you change log file size in my.cnf? Have you restarted MySQL server? earlier the size was different? If yes, then you can not simply change log file size. Please check below link.
    http://www.mysqlperformanceblog.com/...e_size-safely/

    Try to change all parameters safely first and then try to take backup. Thanks.

    Comment


    • Clark
      Clark commented
      Editing a comment
      Edit:
      Ohh, the innodb log files.. I'll try that

      I think I added this parameter:
      max_binlog_size = 100M

      But now its removed again and I restarted mysql.. Same problem..
      Last edited by Clark; 12-11-2013, 03:31 AM.

    • Clark
      Clark commented
      Editing a comment
      Have now tried
      1. # service mysql stop
      2. # mv ib_logfile0 _ib_logfile0
      3. # mv ib_logfile1 _ib_logfile1
      4. # service mysql start

      mysql created new files but backup still fails

    • Clark
      Clark commented
      Editing a comment
      ok after adding --defaults-file it works

      $syntax = 'innobackupex --user='.$mysql_user.' --password='.$mysql_pass.' --defaults-file='.self::MY_CNF.' --databases="'.$mysql_db.' mysql" --stream=tar ./ 2> '.$tmp_log.' | gzip -c -1 > '.$this->path_base.'/'.$this->path_db_backup.'/'.$this->file_db;

  • #3
    could anyone help to fix the issue?!

    Comment


    • #4
      Hi Clark,

      It seems it was reading configuration parameters from some different file and comparing. I hope it works fine now with --defaults-file option. Let me know if you still face the issue. Thanks.

      Comment

      Working...
      X