GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

Backup skips a DB - Bug?

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

  • Backup skips a DB - Bug?

    Hi,

    We use the innobackupex tool to backup a couple of databases:

    /usr/bin/innobackupex --defaults-file=/etc/my.cnf --user=root --password=xxxx --tables-file /backup/tables /backup/MySQL

    The tables file contains a list of tables such as:

    adb-name.tbl1
    adb-name.tbl2
    adb-name.tbl3

    Unfortunately all we get in the backup output is:

    backup-my.cnf ibdata1 ibdata2 xtrabackup_binary xtrabackup_binlog_info xtrabackup_checkpoints xtrabackup_logfile

    nothing for adb-name. We think this is down to the actual DB name, as MySQL stores it on disk as:

    adb@002name

    So whilst MySQL can deal with it, it doesn't look like XtraBackup can.

    For reasons that are out of our control, we can't just dump the DB and restore it to a new name.

    Thanks,

  • #2
    Karl,

    Try listing on the tables file like this instead:

    adb@002dname.tbl1
    adb@002dname.tbl2
    adb@002dname.tbl3
    Our documentation has a lot of answers about common questions on Percona software, have you checked there before posting that question here? http://www.percona.com/forums/core/i...lies/smile.png

    Join us at the annual Percona Live MySQL Users Conference - http://www.percona.com/live/mysql-conference-2014/

    Comment


    • #3
      Hi,

      Apologies for the delayed reply. Our testing shows that this makes no difference, we substitute the - for @002 and it still doesn't do the backup.

      Thanks,

      Karl

      Comment


      • #4
        I was making some tests and by changing the file it works. Could you please send us the full output of the backup?


        $ cat tablestobackup
        adb@002dname.tbl1
        adb@002dname.tbl2
        adb@002dname.tbl3

        $ innobackupex --defaults-file=my.sandbox.cnf --tables-file=tablestobackup backup/

        innobackupex: adb@002dname.tbl1 will be registerd to the list
        innobackupex: adb@002dname.tbl2 will be registerd to the list
        innobackupex: adb@002dname.tbl3 will be registerd to the list
        InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
        and Percona Inc 2009-2012. All Rights Reserved.

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

        121011 13:28:15 innobackupex: Starting mysql with options: --defaults-file='my.sandbox.cnf' --unbuffered --
        121011 13:28:15 innobackupex: Connected to database with mysql child process (pid=1922)
        121011 13:28:21 innobackupex: Connection to database server closed
        IMPORTANT: Please check that the backup run completes successfully.
        At the end of a successful backup run innobackupex
        prints "completed OK!".

        innobackupex: Using mysql Ver 14.14 Distrib 5.5.20, for Linux (x86_64) using readline 5.1
        innobackupex: Using mysql server version Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

        innobackupex: Created backup directory /home/martin/sandboxes/msb_5_5_19/backup/2012-10-11_13-28-21
        121011 13:28:21 innobackupex: Starting mysql with options: --defaults-file='my.sandbox.cnf' --unbuffered --
        121011 13:28:21 innobackupex: Connected to database with mysql child process (pid=1949)
        121011 13:28:23 innobackupex: Connection to database server closed

        121011 13:28:23 innobackupex: Starting ibbackup with command: xtrabackup_55 --defaults-file="my.sandbox.cnf" --backup --suspend-at-end --target-dir=/home/martin/sandboxes/msb_5_5_19/backup/2012-1 0-11_13-28-21 --tables_file='tablestobackup'
        innobackupex: Waiting for ibbackup (pid=1957) to suspend
        innobackupex: Suspend file '/home/martin/sandboxes/msb_5_5_19/backup/2012-10-11_13-28-2 1/xtrabackup_suspended'

        xtrabackup: table 'adb@002dname/tbl1' is registerd to the list.
        xtrabackup: table 'adb@002dname/tbl2' is registerd to the list.
        xtrabackup: table 'adb@002dname/tbl3' is registerd to the list.
        xtrabackup_55 version 2.0.0 for Percona Server 5.5.16 Linux (x86_64) (revision id: 417)
        xtrabackup: uses posix_fadvise().
        xtrabackup: cd to /home/martin/sandboxes/msb_5_5_19/data
        xtrabackup: Target instance is assumed as followings.
        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 = 5242880
        121011 13:28:23 InnoDB: Using Linux native AIO
        >> log scanned up to (2694104)
        [01] Copying ./ibdata1 to /home/martin/sandboxes/msb_5_5_19/backup/2012-10-11_13-28-21 /ibdata1
        [01] ...done

        121011 13:28:25 innobackupex: Continuing after ibbackup has suspended
        121011 13:28:25 innobackupex: Starting mysql with options: --defaults-file='my.sandbox.cnf' --unbuffered --
        121011 13:28:25 innobackupex: Connected to database with mysql child process (pid=1971)
        121011 13:28:27 innobackupex: Starting to lock all tables...
        >> log scanned up to (2694104)
        >> log scanned up to (2694104)
        121011 13:28:37 innobackupex: All tables locked and flushed to disk

        121011 13:28:37 innobackupex: Starting to backup .frm, .MRG, .MYD, .MYI,
        innobackupex: .TRG, .TRN, .ARM, .ARZ, .CSM, .CSV and .opt files in
        innobackupex: subdirectories of '/home/martin/sandboxes/msb_5_5_19/data'
        innobackupex: Backing up file '/home/martin/sandboxes/msb_5_5_19/data/adb@002dname/tbl1.fr m'
        innobackupex: Backing up file '/home/martin/sandboxes/msb_5_5_19/data/adb@002dname/tbl3.fr m'
        innobackupex: Backing up file '/home/martin/sandboxes/msb_5_5_19/data/adb@002dname/tbl2.fr m'
        121011 13:28:37 innobackupex: Finished backing up .frm, .MRG, .MYD, .MYI, .TRG, .TRN, .ARM, .ARZ, .CSV, .CSM and .opt files

        innobackupex: Resuming ibbackup

        xtrabackup: The latest check point (for incremental): '2694104'
        xtrabackup: Stopping log copying thread.
        ..>> log scanned up to (2694104)

        xtrabackup: Transaction log of lsn (2694104) to (2694104) was copied.
        121011 13:28:40 innobackupex: All tables unlocked
        121011 13:28:40 innobackupex: Connection to database server closed

        innobackupex: Backup created in directory '/home/martin/sandboxes/msb_5_5_19/backup/2012-10-11_13-28-2 1'
        innobackupex: MySQL binlog position: filename '', position
        121011 13:28:40 innobackupex: completed OK!

        $ ls backup/2012-10-11_13-28-21/
        adb@002dname backup-my.cnf ibdata1 xtrabackup_binary xtrabackup_binlog_info xtrabackup_checkpoints xtrabackup_logfile


        Martin.

        Comment

        Working...
        X