GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

innobackupex incremental restore incomplete

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

  • innobackupex incremental restore incomplete

    140 root 14 -5 0 0 0 S 0.0 0.0 0:00.00 cqueue/0 141 root 16 -5 0 0 0 S 0.0 0.0 0:00.00 cqueue/1 144 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 khubd 146 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kseriod 215 root 22 0 0 0 0 S 0.0 0.0 0:00.00 ubstatd 217 root 15 0 0 0 0 S 0.0 0.0 0:00.01 khungtaskd 218 root 15 0 0 0 0 S 0.0 0.0 0:53.21 pdflush 219 root 16 0 0 0 0 S 0.0 0.0 0:50.82 pdflush 221 root 17 -5 0 0 0 S 0.0 0.0 0:00.00 aio/0 222 root 17 -5 0 0 0 S 0.0 0.0 0:00.00 aio/1 874 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kpsmoused 908 root 14 -5 0 0 0 S 0.0 0.0 0:00.00 ata/0 909 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 ata/1 910 root 17 -5 0 0 0 S 0.0 0.0 0:00.00 ata_aux 914 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_0 915 root 14 -5 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_1 922 root 12 -5 0 0 0 S 0.0 0.0 0:00.00 kstriped 935 root 16 -5 0 0 0 S 0.0 0.0 0:00.00 ksnapd 954 root 10 -5 0 0 0 S 0.0 0.0 0:11.79 md1_raid1 957 root 10 -5 0 0 0 D 0.0 0.0 0:07.69 md2_raid1 960 root 10 -5 0 0 0 S 0.0 0.0 0:00.75 md0_raid1 963 root 10 -5 0 0 0 D 0.0 0.0 0:06.13 kjournald 990 root 10 -5 0 0 0 S 0.0 0.0 0:00.06 kauditd 1023 root 21 -4 12680 832 400 S 0.0 0.0 0:00.34 udevd 2716 buildbot 18 0 64136 1016 468 S 0.0 0.0 0:00.06 bash 2722 buildbot 23 0 64136 860 312 S 0.0 0.0 0:00.00 bash 2724 buildbot 23 0 64136 860 312 S 0.0 0.0 0:00.00 bash 2725 buildbot 23 0 64136 860 312 S 0.0 0.0 0:00.00 bash 2728 buildbot 23 0 64136 860 312 S 0.0 0.0 0:00.00 bash 2730 buildbot 25 0 64136 892 344 S 0.0 0.0 0:00.00 bash 2731 buildbot 18 0 64136 912 364 S 0.0 0.0 0:00.00 bash 2732 buildbot 16 0 17236 1360 1048 S 0.0 0.0 0:00.02 mysqladmin 2734 buildbot 25 0 64136 916 368 S 0.0 0.0 0:00.00 bash 2740 buildbot 20 0 64136 988 440 S 0.0 0.0 0:00.12 bash 2758 buildbot 24 0 64136 884 336 S 0.0 0.0 0:00.00 bash 2759 buildbot 18 0 58952 672 592 S 0.0 0.0 0:00.00 mpstat 2760 buildbot 24 0 64136 892 344 S 0.0 0.0 0:00.00 bash 2761 buildbot 23 0 64136 888 340 S 0.0 0.0 0:00.00 bash 2762 buildbot 18 0 58948 708 608 S 0.0 0.0 0:00.00 iostat 2763 buildbot 23 0 64136 884 336 S 0.0 0.0 0:00.00 bash 2764 buildbot 18 0 5852 468 392 S 0.0 0.0 0:00.00 vmstat 2769 buildbot 18 0 58984 660 568 S 0.0 0.0 0:00.02 sadc 2945 root 18 0 138m 5148 1364 S 0.0 0.2 0:00.07 python 4457 root 12 -5 0 0 0 S 0.0 0.0 0:00.00 kmpathd/0 4458 root 13 -5 0 0 0 S 0.0 0.0 0:00.00 kmpathd/1 4459 root 12 -5 0 0 0 S 0.0 0.0 0:00.00 kmpath_handlerd 4513 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kjournald 4515 root 11 -5 0 0 0 S 0.0 0.0 0:01.26 kjournald 4521 root 11= 2xtrabackup: innodb_log_file_size = 5242880110614 9:39:33 InnoDB: Using Linux native AIOxtrabackup: Stream mode.>> log scanned up to (1603094)110614 09:39:35 innobackupex: Continuing after ibbackup has suspendedinnobackupex: Starting to backup InnoDB tables and indexesinnobackupex: from original InnoDB data directory '/var/lib/mysql'innobackupex: Backing up as tar stream 'ibdata1'110614 09:39:36 innobackupex: Starting mysql with options: --unbuffered --110614 09:39:36 innobackupex: Connected to database with mysql child process (pid=23742)>> log scanned up to (1603094)110614 09:39:40 innobackupex: Starting to backup .frm, .MRG, .MYD, .MYI,innobackupex: .TRG, .TRN, .ARM, .ARZ, .CSM, .CSV and .opt files ininnobackupex: subdirectories of '/var/lib/mysql'innobackupex: Backing up files '/var/lib/mysql/performance_schema/*.{frm,MYD,MYI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par }' (18 files)innobackupex: Backing up files '/var/lib/mysql/mysql/*.{frm,MYD,MYI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par }' (72 files)innobackupex: Backing up file '/var/lib/mysql/fotow/muestras_directas.frm'innobackupex: Backing up file '/var/lib/mysql/fotow/db.opt'110614 09:39:42 innobackupex: Finished backing up .frm, .MRG, .MYD, .MYI, .TRG, .TRN, .ARM, .ARZ, .CSV, .CSM and .opt filesinnobackupex: Resuming ibbackupxtrabackup: The latest check point (for incremental): '1603094'>> log scanned up to (1603094)xtrabackup: Transaction log of lsn (1603094) to (1603094) was copied.110614 09:39:42 innobackupex: Connection to database server closedinnobackupex: Backup created in directory '/'innobackupex: You must use -i (--ignore-zeros) option for extraction of the tar stream.110614 09:39:42 innobackupex: completed OK!


    full-backup info:

    ls -lh backups/mysql/full/total 220K-rw-r--r-- 1 root root 0 Jun 14 09:39 mysql-stderr-rw-r--r-- 1 root root 76 Jun 14 09:39 mysql-stdout-rw-r--r-- 1 root root 77 Jun 14 09:39 xtrabackup_checkpoints-rw-r--r-- 1 root root 205K Jun 14 09:39 2011-06-14_09-39-21.fotow-RH5.tar.gz[root@fotow-RH5 scada]# cat backups/mysql/full/xtrabackup_checkpoints backup_type = full-backupedfrom_lsn = 0to_lsn = 1603094last_lsn = 1603094


    Insert of new data before incremental backup:


    mysql> insert into muestras_directas (valor) VALUES (30),(31),(32),(33),(34);mysql> select * from muestras_directas;+----+-------+| id | valor |+----+-------+| 1 | 1 || 2 | 5 || 3 | 10 || 4 | 15 || 5 | 20 || 6 | 25 || 7 | 30 || 8 | 31 || 9 | 32 || 10 | 33 || 11 | 34 |+----+-------+11 rows in set (0.00 sec)mysql> quitBye


    The incremental backup done by:
    ""


    /usr/bin/innobackupex-1.5.1 --incremental --parallel=4 --no-lock --tmpdir=/var/scada/backups/mysql --incremental-basedir=/var/scada/backups/mysql/full --incremental-basedir=/var/scada/backups/mysql/full/2011-06-14_09-39-21.fotow-RH5.tar.gz --extra-lsndir=/var/scada/backups/mysql/inc-martes --compress=9 --stream=tar /. | gzip - > /var/scada/backups/mysql/inc-martes/2011-06-14_09-41-41.fotow-RH5.INC.tar.gz


    log:

    InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oyand Percona Inc 2009-2011. All Rights Reserved.This software is published underthe GNU GENERAL PUBLIC LICENSE Version 2, June 1991.110614 09:41:43 innobackupex-1.5.1: Starting mysql with options: --unbuffered --110614 09:41:43 innobackupex-1.5.1: Connected to database with mysql child process (pid=24037)110614 09:41:50 innobackupex-1.5.1: Connection to database server closedIMPORTANT: Please check that the backup run completes successfully. At the end of a successful backup run innobackupex-1.5.1 prints "completed OK!".innobackupex-1.5.1: Using mysql Ver 14.14 Distrib 5.5.9, for Linux (x86_64) using readline 5.1innobackupex-1.5.1: Using mysql server version Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.innobackupex-1.5.1: Created backup directory /110614 09:41:50 innobackupex-1.5.1: Starting mysql with options: --unbuffered --110614 09:41:50 innobackupex-1.5.1: Connected to database with mysql child process (pid=24070)110614 09:41:54 innobackupex-1.5.1: Connection to database server closed110614 09:41:54 innobackupex-1.5.1: Starting ibbackup with command: xtrabackup_55 --backup --suspend-at-end --log-stream --target-dir=./ --compress=9 --extra-lsndir='/var/scada/backups/mysql/inc-martes' --incremental-basedir='/var/scada/backups/mysql/full' --parallel=4innobackupex-1.5.1: Waiting for ibbackup (pid=24085) to suspendinnobackupex-1.5.1: Suspend file '/var/lib/mysql/xtrabackup_suspended'xtrabackup: suspend-at-end is enabled.xtrabackup: uses posix_fadvise().xtrabackup: cd to /var/lib/mysqlxtrabackup: Target instance is assumed as followings.xtrabackup: innodb_data_home_dir = ./xtrabackup: innodb_data_file_path = ibdata1:10M:autoextendxtrabackup: innodb_log_group_home_dir = ./xtrabackup: innodb_log_files_in_group = 2xtrabackup: innodb_log_file_size = 5242880110614 9:41:54 InnoDB: Using Linux native AIOxtrabackup: Stream mode.>> log scanned up to (1603385)110614 09:41:56 innobackupex-1.5.1: Continuing after ibbackup has suspendedinnobackupex-1.5.1: Starting to backup InnoDB tables and indexesinnobackupex-1.5.1: from original InnoDB data directory '/var/lib/mysql'innobackupex-1.5.1: Backing up as tar stream 'ibdata1'110614 09:41:57 innobackupex-1.5.1: Starting to backup .frm, .MRG, .MYD, .MYI,innobackupex-1.5.1: .TRG, .TRN, .ARM, .ARZ, .CSM, .CSV and .opt files ininnobackupex-1.5.1: subdirectories of '/var/lib/mysql'innobackupex-1.5.1: Backing up files '/var/lib/mysql/performance_schema/*.{frm,MYD,MYI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par }' (18 files)innobackupex-1.5.1: Backing up files '/var/lib/mysql/mysql/*.{frm,MYD,MYI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par }' (72 files)innobackupex-1.5.1: Backing up file '/var/lib/mysql/fotow/muestras_directas.frm'innobackupex-1.5.1: Backing up file '/var/lib/mysql/fotow/db.opt'110614 09:41:59 innobackupex-1.5.1: Finished backing up .frm, .MRG, .MYD, .MYI, .TRG, .TRN, .ARM, .ARZ, .CSV, .CSM and .opt filesinnobackupex-1.5.1: Resuming ibbackupxtrabackup: The latest check point (for incremental): '1603385'>> log scanned up to (1603385)xtrabackup: Transaction log of lsn (1603385) to (1603385) was copied.innobackupex-1.5.1: Backup created in directory '/'innobackupex-1.5.1: You must use -i (--ignore-zeros) option for extraction of the tar stream.110614 09:41:59 innobackupex-1.5.1: completed OK!


    incremental backup info:


    [root@fotow-RH5 scada]# ls -lht backups/mysql/in c-martes/total 216K-rw-r--r-- 1 root root 205K Jun 14 09:41 2011-06-14_09-41-41.fotow-RH5.INC.tar.gz-rw-r--r-- 1 root root 81 Jun 14 09:41 xtrabackup_checkpointsroot@fotow-RH5:/var/scada [root@fotow-RH5 scada]# cat backups/mysql/inc-martes/xtrabackup_checkpoints backup_type = incrementalfrom_lsn = 1603094to_lsn = 1603385last_lsn = 1603385


    Restore:
    create temp dirs, prepare full backup and pply incremental backup, then move data to mysql datadir and start it:


    mkdir backups/mysql/restoremysql[root@fotow-RH5 scada]# tar -zxif backups/mysql/full/ 2011-06-14_09-39-21.fotow-RH5.tar.gz -C /var/scada/backups/mysql/restoremysqlmkdir backups/mysql/inc-martes/inc1[root@fotow-RH5 scada]# tar -zxif backups/mysql/inc-martes/2011-06-14_09-41-41.fotow-RH5.INC.tar.gz -C backups/mysql/inc-martes/inc1[root@fotow-RH5 scada]# ls -l backups/mysql/full/restoremysql/total 18480-rw-r--r-- 1 root root 249 Jun 14 09:39 backup-my.cnfdrwxr-xr-x 2 root root 4096 Jun 14 09:43 fotow-rw-rw---- 1 mysql mysql 18874368 Jun 13 14:20ibdata1drwxr-xr-x 2 root root 4096 Jun 14 09:43 mysqldrwxr-xr-x 2 root root 4096 Jun 14 09:43 performance_schema-rw-r--r-- 1 root root 77 Jun 14 09:39 xtrabackup_checkpoints-rw-r--r-- 1 root root 2560 Jun 14 09:39 xtrabackup_logfileroot@fotow-RH5:/var/scada [root@fotow-RH5 scada]# cat backups/mysql/restoremysql/xt rabackup_checkpoints backup_type = full-backupedfrom_lsn = 0to_lsn = 1603094last_lsn = 1603094[satec@fotow-RH5 ~]$ ls -lh /var/scada/backups/mysql/inc-martes/inc1/total 21M-rw-r--r-- 1 root root 255 Jun 14 09:41 backup-my.cnfdrwxr-xr-x 2 root root 4.0K Jun 14 09:44 fotow-rw-rw---- 1 mysql mysql 18M Jun 14 09:40 ibdata1drwxr-xr-x 2 root root 4.0K Jun 14 09:44 mysqldrwxr-xr-x 2 root root 4.0K Jun 14 09:44 performance_schema-rw-r--r-- 1 root root 81 Jun 14 09:41 xtrabackup_checkpoints-rw-r--r-- 1 root root 2.0M Jun 14 09:50 xtrabackup_logfile[satec@fotow-RH5 ~]$ cat /var/scada/backups/mysql/inc-martes/inc1/xtrabackup_checkpointsbackup_type = incrementalfrom_lsn = 1603094to_lsn = 1603385last_lsn = 1603385


    Prepare full backup:

    [root@fotow-RH5 scada]# innobackupexc --apply-log --redo-only /var/scada/backups/ mysql/restoremysql/ --use-memory=512M InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oyand Percona Inc 2009-2011. All Rights Reserved.This software is published underthe GNU GENERAL PUBLIC LICENSE Version 2, June 1991.option_ibbackup_binary is autodetect, trying to connect to MySQLConnected to MySQL with pid 24314110614 09:45:21 innobackupex: Connection to database server closedConnected successfully110614 09:45:21 innobackupex: Starting mysql with options: --unbuffered --110614 09:45:21 innobackupex: Connected to database with mysql child process (pid=24319)110614 09:45:27 innobackupex: Connection to database server closedIMPORTANT: Please check that the apply-log run completes successfully. At the end of a successful apply-log run innobackupex prints "completed OK!".110614 09:45:27 innobackupex: Starting ibbackup with command: xtrabackup_55 --prepare --target-dir=/var/scada/backups/mysql/restoremysql --apply-log-only --use-memory=512Mxtrabackup_55 Ver 1.6 Rev 245 for 5.5.9 Linux (x86_64)xtrabackup: cd to /var/scada/backups/mysql/restoremysqlxtrabackup: This target seems to be not prepared yet.xtrabackup: xtrabackup_logfile detected: size=2097152, start_lsn=(1603094)xtrabackup: Temporary instance for recovery is set as followings.xtrabackup: innodb_data_home_dir = ./xtrabackup: innodb_data_file_path = ibdata1:10M:autoextendxtrabackup: innodb_log_group_home_dir = ./xtrabackup: innodb_log_files_in_group = 1xtrabackup: innodb_log_file_size = 2097152110614 9:45:28 InnoDB: Using Linux native AIOxtrabackup: Starting InnoDB instance for recovery.xtrabackup: Using 536870912 bytes for buffer pool (set by --use-memory parameter)110614 9:45:28 InnoDB: The InnoDB memory heap is disabled110614 9:45:28 InnoDB: Mutexes and rw_locks use GCC atomic builtins110614 9:45:28 InnoDB: Compressed tables use zlib 1.2.3110614 9:45:28 InnoDB: Using Linux native AIO110614 9:45:33 InnoDB: Warning: innodb_file_io_threads is deprecated. Please use innodb_read_io_threads and innodb_write_io_threads instead110614 9:45:34 InnoDB: Initializing buffer pool, size = 512.0M110614 9:46:18 InnoDB: Completed initialization of buffer pool110614 9:46:32 InnoDB: highest supported file format is Barracuda.InnoDB: The log sequence number in ibdata files does not matchInnoDB: the log sequence number in the ib_logfiles!110614 9:47:09 InnoDB: Database was not shut down normally!InnoDB: Starting crash recovery.InnoDB: Reading tablespace information from the .ibd files...[notice (again)] If you use binary log and don't use any hack of group commit, the binary log position seems to be:xtrabackup: starting shutdown with innodb_fast_shutdown = 1110614 9:47:53 InnoDB: Starting shutdown...110614 9:47:56 InnoDB: Shutdown completed; log sequence number 1603094110614 09:47:56 innobackupex: completed OK!


    Apply incremental changes:


    [root@fotow-RH5 scada]# innob ackupex --apply-log /var/scada/backups/mysql/restoreemysql/ --incremental-dir=/var/scaba /var/scada/backups/mysql/inc-martes/inc1 --use-memory=512MInnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oyand Percona Inc 2009-2011. All Rights Reserved.This software is published underthe GNU GENERAL PUBLIC LICENSE Version 2, June 1991.option_ibbackup_binary is autodetect, trying to connect to MySQLConnected to MySQL with pid 24422110614 09:50:28 innobackupex: Connection to database server closedConnected successfully110614 09:50:28 innobackupex: Starting mysql with options: --unbuffered --110614 09:50:28 innobackupex: Connected to database with mysql child process (pid=24427)110614 09:50:34 innobackupex: Connection to database server closedIMPORTANT: Please check that the apply-log run completes successfully. At the end of a successful apply-log run innobackupex prints "completed OK!".110614 09:50:34 innobackupex: Starting ibbackup with command: xtrabackup_55 --prepare --target-dir=/var/scada/backups/mysql/restoremysql --use-memory=512M --incremental-dir=/var/scada/backups/mysql/inc-martes/inc1xtrabackup_55 Ver 1.6 Rev 245 for 5.5.9 Linux (x86_64)incremental backup from 1603094 is enabled.xtrabackup: cd to /var/scada/backups/mysql/restoremysqlxtrabackup: This target seems to be already prepared.xtrabackup: xtrabackup_logfile detected: size=2097152, start_lsn=(1603385)xtrabackup: Temporary instance for recovery is set as followings.xtrabackup: innodb_data_home_dir = ./xtrabackup: innodb_data_file_path = ibdata1:10M:autoextendxtrabackup: innodb_log_group_home_dir = /var/scada/backups/mysql/inc-martes/inc1xtrabackup: innodb_log_files_in_group = 1xtrabackup: innodb_log_file_size = 2097152110614 9:50:34 InnoDB: Using Linux native AIOxtrabackup: Starting InnoDB instance for recovery.xtrabackup: Using 536870912 bytes for buffer pool (set by --use-memory parameter)110614 9:50:34 InnoDB: The InnoDB memory heap is disabled110614 9:50:34 InnoDB: Mutexes and rw_locks use GCC atomic builtins110614 9:50:34 InnoDB: Compressed tables use zlib 1.2.3110614 9:50:34 InnoDB: Using Linux native AIO110614 9:50:34 InnoDB: Warning: innodb_file_io_threads is deprecated. Please use innodb_read_io_threads and innodb_write_io_threads instead110614 9:50:34 InnoDB: Initializing buffer pool, size = 512.0M110614 9:50:37 InnoDB: Completed initialization of buffer pool110614 9:50:37 InnoDB: highest supported file format is Barracuda.InnoDB: The log sequence number in ibdata files does not matchInnoDB: the log sequence number in the ib_logfiles!110614 9:50:38 InnoDB: Database was not shut down normally!InnoDB: Starting crash recovery.InnoDB: Reading tablespace information from the .ibd files...110614 9:50:38 InnoDB: Waiting for the background threads to start110614 9:50:39 Percona XtraDB (http://www.percona.com) 1.1.5-20.0 started; log sequence number 1603385[notice (again)] If you use binary log and don't use any hack of group commit, the binary log position seems to be:xtrabackup: starting shutdown with innodb_fast_shutdown = 1110614 9:50:39 InnoDB: Starting shutdown...110614 9:50:43 InnoDB: Shutdown completed; log sequence number 1603385110614 09:50:43 innobackupex: completed OK!


    Then, stop mysql, change datadir and startit, the data only has the full bakckup data, the inserts after full backup are gone:


    [root@fotow-RH5 scada]# mysqladmin shutdown[root@fotow-RH5 scada]# chown -R mysql:mysql /var/scada/backups/mysql/restoremysqlmv /var/lib/mysql /var/lib/mysql.0mv /var/scada/backups/mysql/restoremysql/ /var/lib/mysqlservice mysql start[root@fotow-RH5 scada]# mysqlWelcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 1Server version: 5.5.9 MySQL Community Server (GPL)Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> use fotowReading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -ADatabase changedmysql> select * from muestras_directas;+----+-------+| id | valor |+----+-------+| 1 | 1 || 2 | 5 || 3 | 10 || 4 | 15 || 5 | 20 || 6 | 25 |+----+-------+6 rows in set (0.00 sec)mysql> quitBye


    /etc/my.cnf file:

    [mysqld]datadir=/var/lib/mysql#datadir=/var/scada/backups/mysql/full/backupdest/socket=/var/lib/mysql/mysql.sockuser=mysqlbind-address = 127.0.0.1port = 3306skip-name-resolve# Default to using old password format for compatibility with mysql 3.x# clients (those using the mysqlclient10 compatibility package).#old_passwords=1lower_case_table_names=1# Tuning de Rendimiento InnoDB#key_buffer_size=1024M# query_cache_size=8388608#innodb_buffer_pool_size=4 G#table_open_cache=1024#table_definition_cache=204 8#max_allowed_packet=20M# Disabling symbolic-links is recommended to prevent assorted security risks;# to do so, uncomment this line:# symbolic-links=0[mysqld_safe]log-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pid

  • #2
    Ok, ive restored succesfully a full backup with incremental changes applied but the --prepare actions were performed by xtrabackup directly, innobackupex needs mysql running and that seems a problem on hypotetical disaster on server. The backups were performed with:

    /usr/bin/innobackupex --parallel=4 --no-lock --tmpdir=/var/scada/backups/mysql/full --extra-lsndir=/var/scada/backups/mysql/full --compress=9 --stream=tar /. | gzip - > /var/scada/backups/mysql/full/2011-06-15_12-00-05.fotow-RH5.tar.gz/usr/bin/innobackupex --incremental --parallel=4 --no-lock --tmpdir=/var/scada/backups/mysql --incremental-basedir=/var/scada/backups/mysql/full --extra-lsndir=/var/scada/backups/mysql/inc-jueves /var/scada/backups/mysql/inc-jueves


    The prepare stage must be exejecuted by xtrabackup directly:
    innobackupex fail if mysql is not running (in a disaster y will not have a valid mysql running)

    [root@fotow-RH5 scada]# innobackupex --apply-log --redo-only /var/scada/backups/ mysql/restoremysql/ --use-memory=512MInnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oyand Percona Inc 2009-2011. All Rights Reserved.This software is published underthe GNU GENERAL PUBLIC LICENSE Version 2, June 1991.option_ibbackup_binary is autodetect, trying to connect to MySQLConnected to MySQL with pid 3342Failed to connect to MySQL server to detect version.You must set xtrabackup version to use with --ibbackup option.Possible values are xtrabackup_51 (for MySQL 5.0 and 5.1) or xtrabackup (for MySQL 5.1 with InnoDB plugin or Percona Server)


    Prepare backup wich xtrabackup directly:


    [root@fotow-RH5 scada]# xtrabackup --prepare --apply-log-only --target-dir=/var/ scada/backups/mysql/restoremysql/xtrabackup Ver 1.6 Rev 245 for 5.1.55 unknown-linux-gnu (x86_64)xtrabackup: cd to /var/scada/backups/mysql/restoremysql/xtrabackup: This target seems to be not prepared yet.xtrabackup: xtrabackup_logfile detected: size=2097152, start_lsn=(1605142)xtrabackup: Temporary instance for recovery is set as followings.xtrabackup: innodb_data_home_dir = ./xtrabackup: innodb_data_file_path = ibdata1:10M:autoextendxtrabackup: innodb_log_group_home_dir = ./xtrabackup: innodb_log_files_in_group = 1xtrabackup: innodb_log_file_size = 2097152xtrabackup: Starting InnoDB instance for recovery.xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter )InnoDB: The InnoDB memory heap is disabledInnoDB: Mutexes and rw_locks use GCC atomic builtinsInnoDB: Compressed tables use zlib 1.2.3InnoDB: Warning: innodb_file_io_threads is deprecated. Please use innodb_read_io _threads and innodb_write_io_threads instead110615 12:20:30 InnoDB: Initializing buffer pool, size = 100.0M110615 12:20:30 InnoDB: Completed initialization of buffer pool110615 12:20:30 InnoDB: highest supported file format is Barracuda.InnoDB: The log sequence number in ibdata files does not matchInnoDB: the log sequence number in the ib_logfiles!110615 12:20:30 InnoDB: Database was not shut down normally!InnoDB: Starting crash recovery.InnoDB: Reading tablespace information from the .ibd files...[notice (again)] If you use binary log and don't use any hack of group commit, the binary log position seems to be:xtrabackup: starting shutdown with innodb_fast_shutdown = 1110615 12:20:30 InnoDB: Starting shutdown...110615 12:20:31 InnoDB: Shutdown completed; log sequence number 1605142[root@fotow-RH5 scada]# cat backups/mysql/full/xtrabackup_checkpointsbackup_type = full-backupedfrom_lsn = 0to_lsn = 1605142last_lsn = 1605142[root@fotow-RH5 scada]# xtrabackup --prepare --apply-log-only --target-dir=/var/scada/backups/mysql/restoremysql --incremental-dir=/var/scada/backups/mysql/inc-jueves/inc1/2011-06-15_12-06-31xtrabackup Ver 1.6 Rev 245 for 5.1.55 unknown-linux-gnu (x86_64)incremental backup from 1605142 is enabled.xtrabackup: cd to /var/scada/backups/mysql/restoremysqlxtrabackup: This target seems to be already prepared.xtrabackup: xtrabackup_logfile detected: size=2097152, start_lsn=(1605383)xtrabackup: page size for /var/scada/backups/mysql/inc-jueves/inc1/2011-06-15_12-06-31/ibdata1.delta is 16384 bytesApplying /var/scada/backups/mysql/inc-jueves/inc1/2011-06-15_12-06-31/ibdata1.delta ...xtrabackup: Temporary instance for recovery is set as followings.xtrabackup: innodb_data_home_dir = ./xtrabackup: innodb_data_file_path = ibdata1:10M:autoextendxtrabackup: innodb_log_group_home_dir = /var/scada/backups/mysql/inc-jueves/inc1/2011-06-15_12-06-31xtrabackup: innodb_log_files_in_group = 1xtrabackup: innodb_log_file_size = 2097152xtrabackup: Starting InnoDB instance for recovery.xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)InnoDB: The InnoDB memory heap is disabledInnoDB: Mutexes and rw_locks use GCC atomic builtinsInnoDB: Compressed tables use zlib 1.2.3InnoDB: Warning: innodb_file_io_threads is deprecated. Please use innodb_read_io_threads and innodb_write_io_threads instead110615 12:31:16 InnoDB: Initializing buffer pool, size = 100.0M110615 12:31:16 InnoDB: Completed initialization of buffer pool110615 12:31:16 InnoDB: highest supported file format is Barracuda.InnoDB: The log sequence number in ibdata files does not matchInnoDB: the log sequence number in the ib_logfiles!110615 12:31:16 InnoDB: Database was not shut down normally!InnoDB: Starting crash recovery.InnoDB: Reading tablespace information from the .ibd files...[notice (again)] If you use binary log and don't use any hack of group commit, the binary log position seems to be:xtrabackup: starting shutdown with innodb_fast_shutdown = 1110615 12:31:17 InnoDB: Starting shutdown...110615 12:31:17 InnoDB: Shutdown completed; log sequence number 1605383[root@fotow-RH5 scada]# cat backups/mysql/inc-jueves/xtrabackup_checkpointsbackup_type = incrementalfrom_lsn = 1605142to_lsn = 1605383last_lsn = 1605383


    MySQL has the inserts after the full backup on the new datadir.

    Bye.

    Comment

    • Working...
      X