Announcement

Announcement Module
Collapse
No announcement yet.

Empty Databases after Xtrabackup

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

  • Empty Databases after Xtrabackup

    Hi.

    On source server
    1. debian, Server version: 5.5.29-30.0-log Percona Server
    or
    2. debian, mysql Server version: 5.1.63-0+squeeze1-log

    I'm trying backup my MySQL databases using xtrabackup (debian squeeze, apt-get installed)

    than I copy backup and files from /etc/mysql/ to source server

    On destination server (debian, mysql 5.1.66-0+squeeze1 or 5.1.58-1~dotdeb.0-log)


    innobackupex --apply-log --defaults-file=/root/backup/my.cnf --ibbackup=xtrabackup --use-memory=4G /root/backup/


    ...innobackupex: completed OK!
    than copy files to /var/lib/mysql


    chown -R mysql:mysql /var/lib/mysql/



    pr 11 02:44:39 servername mysqld_safe: Starting mysqld daemon with databases from /var/lib/mysql
    Apr 11 02:44:39 servername mysqld: 130411 2:44:39 [Note] Plugin 'FEDERATED' is disabled.
    Apr 11 02:44:39 servername mysqld: /usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
    Apr 11 02:44:39 servername mysqld: 130411 2:44:39 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to cre
    ate it.
    Apr 11 02:44:39 servername mysqld: 130411 2:44:39 InnoDB: Initializing buffer pool, size = 1.0G
    Apr 11 02:44:39 servername mysqld: 130411 2:44:39 InnoDB: Completed initialization of buffer pool
    Apr 11 02:44:40 servername mysqld: 130411 2:44:40 InnoDB: Started; log sequence number 3 3369132556
    Apr 11 02:44:40 servername mysqld: 130411 2:44:40 [Note] Recovering after a crash using /var/log/mysql/mysql-bin
    Apr 11 02:44:40 servername mysqld: 130411 2:44:40 [Note] Starting crash recovery...
    Apr 11 02:44:40 servername mysqld: 130411 2:44:40 [Note] Crash recovery finished.
    Apr 11 02:44:40 servername mysqld: 130411 2:44:40 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

    than to fix

    mysql_install_db --user=mysql --ldata=/var/lib/mysql/

    so I can start mysql now
    I see files in /var/lib/mysql, databases has normal sizes like on source, but when I'm doing show databases I see empty results, the same using phpmyadmin or other tool


    Can anybody help my
    Thanks in advance,
    Taras

  • #2
    If not do innobackupex --apply-log....
    and just copy backuped files to /var/lib/mysql I see other error

    mysqld: 130411 3:25:18 InnoDB: Error: page 49 log sequence number 0 7205063
    mysqld: InnoDB: is in the future! Current system log sequence number 0 44233.
    mysqld: InnoDB: Your database may be corrupt or you may have copied the InnoDB
    mysqld: InnoDB: tablespace but not the InnoDB log files. See
    mysqld: InnoDB: http :// dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html
    mysqld: InnoDB: for more information.

    and the same issue, can not see any data, like empty DB

    Comment


    • #3
      If you are using the xtrabackup* binary to backup from the source, those missing database will not be included and including a number of other files as well. Make sure to you innobackupex to do the backup as well.

      http://www.percona.com/doc/percona-x...p/how-tos.html
      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

      Working...
      X