I created a partial backup:
[baron@ginger ~]$ xtrabackup --backup --target-dir=/home/baron/backups --datadir=/home/baron/etc/mysql/server/5.1.41/data/ --tables-file=tables
xtrabackup: table 'test/t1' is registerd to the list.
xtrabackup: table 'test/t2' is registerd to the list.
....
Then I prepared it,
[baron@ginger ~]$ xtrabackup --prepare --target-dir=backups/
That all worked fine, then I tried to use --stats. The first time I did it, it created zero-sized ib_logfiles. It should have not done that! Then it crashed. I thought that maybe it failed because the partial backup caused a problem. I ran it again with --tables, and this time, it failed because it expected the log files to be 5MB.
[baron@ginger ~]$ xtrabackup --stats --data-dir=backups/
xtrabackup Ver undefined Rev undefined for 5.1.47 pc-linux-gnu (i686)
xtrabackup: Can't change dir to '/var/lib/mysql' (Errcode: 2)
xtrabackup: cannot my_setwd /var/lib/mysql
[baron@ginger ~]$ xtrabackup --stats --datadir=backups/
xtrabackup Ver undefined Rev undefined for 5.1.47 pc-linux-gnu (i686)
xtrabackup: cd to backups/
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
xtrabackup: Starting 'read-only' InnoDB instance to gather index statistics.
xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
101107 22:46:32 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
101107 22:46:32 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
101107 22:46:32 InnoDB: highest supported file format is Barracuda.
InnoDB: Error: tried to read 512 bytes at offset 0 512.
InnoDB: Was only able to read 0.
InnoDB: Fatal error: cannot read from file. OS error number 17.
101107 22:46:32 InnoDB: Assertion failure in thread 3079362768 in file os/os0file.c line 2461
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html
InnoDB: about forcing recovery.
Aborted (core dumped)
[baron@ginger ~]$ xtrabackup --stats --datadir=backups/ --tables=t1
xtrabackup: tables regcomp(t1): Success
xtrabackup Ver undefined Rev undefined for 5.1.47 pc-linux-gnu (i686)
xtrabackup: cd to backups/
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
xtrabackup: Starting 'read-only' InnoDB instance to gather index statistics.
xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
InnoDB: Error: log file ./ib_logfile0 is of different size 0 0 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
xtrabackup: innodb_init(): Error occured.
[baron@ginger ~]$ ls -lh backups/
total 21M
-rw-rw-r-- 1 baron baron 18M Nov 7 22:31 ibdata1
-rw-rw-r-- 1 baron baron 0 Nov 7 22:46 ib_logfile0
-rw-rw-r-- 1 baron baron 0 Nov 7 22:46 ib_logfile1
drwx------ 2 baron baron 4.0K Nov 7 22:12 test
drwx------ 2 baron baron 4.0K Nov 7 22:12 test1
-rw-rw-r-- 1 baron baron 59 Nov 7 22:31 xtrabackup_checkpoints
-rw-rw-r-- 1 baron baron 2.0M Nov 7 22:31 xtrabackup_logfile
Assigned to Valentine to create test case