[Newbie]: Error: cannot open ./xtrabackup_checkpoints

Got this error running it for the first time
innobackupex-1.5.1 --defaults-file=/etc/mysql/my.cnf --ibbackup=xtrabackup_51 --apply-log --stream=tar /data/backups/mysql/ | gzip - > backup.date +20100110113700.tar.gz

110110 10:49:29 innobackupex-1.5.1: Starting ibbackup with command: xtrabackup_51 --defaults-file="/etc/mysql/my.cnf" --prepare --target-dir=/data/backups/mysqlxtrabackup: cd to /data/backups/mysqlxtrabackup: Error: cannot open ./xtrabackup_checkpointsxtrabackup: error: xtrabackup_read_metadata()xtrabackup: This target seems not to have correct metadata…110110 10:49:29 InnoDB: Operating system error number 2 in a file operation.InnoDB: The error means the system cannot find the path specified.xtrabackup: Warning: cannot open ./xtrabackup_logfile. will try to find.110110 10:49:29 InnoDB: Operating system error number 2 in a file operation.InnoDB: The error means the system cannot find the path specified. xtrabackup: Fatal error: cannot find ./xtrabackup_logfile.xtrabackup: Error: xtrabackup_init_temp_log() failed.innobackupex-1.5.1: Error:innobackupex-1.5.1: ibbackup failed at /usr/bin/innobackupex-1.5.1 line 534.

Ehhh, what?

Running Ubuntu 10.10, mysql 5.1

Any suggestions?

Kind regards,

Marc

So, I tried running one backup with xtrabackup directly. After doing this, innobackupex-1.5.1 does something more. Weird.

It also has all sorts of alarming messages about crash recovery and improperly shut down databases. Should I consider this an ok backup?
Why do I need to run a manual backup first to get something going?

110110 17:00:37 innobackupex-1.5.1: Starting ibbackup with command: xtrabackup_51 --defaults-file="/etc/mysql/my.cnf" --prepare --target-dir=/data/backups/mysqlxtrabackup: cd to /data/backups/mysqlxtrabackup: error: xtrabackup_read_metadata()xtrabackup: This target seems to be not prepared yet.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: The log sequence number in ibdata files does not matchInnoDB: the log sequence number in the ib_logfiles!110110 17:00:37 InnoDB: Database was not shut down normally!InnoDB: Starting crash recovery.InnoDB: Reading tablespace information from the .ibd files…110110 17:00:37 InnoDB: Started; log sequence number 0 45836xtrabackup: starting shutdown with innodb_fast_shutdown = 1110110 17:00:37 InnoDB: Starting shutdown…InnoDB: Warning: some resources were not cleaned up in shutdown:InnoDB: threads 0, events 0, os_mutexes 0, os_fast_mutexes 18446744073709551615110110 17:00:39 InnoDB: Shutdown completed; log sequence number 0 45836110110 17:00:39 innobackupex-1.5.1: Restarting xtrabackup with command: xtrabackup_51 --defaults-file="/etc/mysql/my.cnf" --prepare --target-dir=/data/backups/mysqlfor creating ib_logfile*xtrabackup: cd to /data/backups/mysqlxtrabackup: This target seems to be already prepared.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 = 2xtrabackup: innodb_log_file_size = 5242880xtrabackup: Starting InnoDB instance for recovery.xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)InnoDB: The InnoDB memory heap is disabled110110 17:00:39 InnoDB: Log file ./ib_logfile0 did not exist: new to be createdInnoDB: Setting log file ./ib_logfile0 size to 5 MBInnoDB: Database physically writes the file full: wait…110110 17:00:39 InnoDB: Log file ./ib_logfile1 did not exist: new to be createdInnoDB: Setting log file ./ib_logfile1 size to 5 MBInnoDB: Database physically writes the file full: wait…InnoDB: The log sequence number in ibdata files does not matchInnoDB: the log sequence number in the ib_logfiles!110110 17:00:39 InnoDB: Database was not shut down normally!InnoDB: Starting crash recovery.InnoDB: Reading tablespace information from the .ibd files…110110 17:00:39 InnoDB: Started; log sequence number 0 46092xtrabackup: starting shutdown with innodb_fast_shutdown = 1110110 17:00:39 InnoDB: Starting shutdown…InnoDB: Warning: some resources were not cleaned up in shutdown:InnoDB: threads 0, events 0, os_mutexes 0, os_fast_mutexes 18446744073709551615110110 17:00:40 InnoDB: Shutdown completed; log sequence number 0 46092innobackupex-1.5.1: You must use -i (–ignore-zeros) option for extraction of the tar stream.110110 17:00:40 innobackupex-1.5.1: completed OK!

Kind regards,

Marc

Ok, so I finally got that running innobackupex twice is normal.
However, in doing so, through a bash file, I still get some messages about crash recovery etc. Am I doing something wrong?

Also there is mention of database shutdown, but I’m expecting a “hot” backup that won’t significantly disrupt service. Am I correct to assume that this is the case?

These are the commands I execute:

BCK_NOW=$(date +"%Y-%m-%d")BCK_TIME=$(date +"%H-%M-%S")innobackupex-1.5.1 --user=${MYSQL_USER} --password=${MYSQL_PASS} --defaults-file=/etc/mysql/my.cnf --ibbackup=xtrabackup_51 --no-timestamp --no-lock ${BCK_OUTPUT_PATH}${BCK_NOW}${BCK_TIME}innobackupex-1.5.1 --user=${MYSQL_USER} --password=${MYSQL_PASS} --defaults-file=/etc/mysql/my.cnf --ibbackup=xtrabackup_51 --apply-log ${BCK_OUTPUT_PATH}${BCK_NOW}${BCK_NOW}${BCK_TIME}

The script ends like this

xtrabackup: starting shutdown with innodb_fast_shutdown = 1110110 23:26:40 InnoDB: Starting shutdown…InnoDB: Warning: some resources were not cleaned up in shutdown:InnoDB: threads 0, events 0, os_mutexes 0, os_fast_mutexes 18446744073709551615110110 23:26:41 InnoDB: Shutdown completed; log sequence number 0 45836110110 23:26:41 innobackupex-1.5.1: Restarting xtrabackup with command: xtrabackup_51 --defaults-file="/etc/mysql/my.cnf" --prepare --target-dir=/data/backups/mysql/bc011-01-10_23-26-22for creating ib_logfile*xtrabackup_51 Ver 1.4 Rev 193 for 5.1.42 unknown-linux-gnu (x86_64)xtrabackup: cd to /data/backups/mysql/bck/2011-01-10_23-26-22xtrabackup: This target seems to be already prepared.xtrabackup: notice: xtrabackup_logfile was already used to ‘–prepare’.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 = 2xtrabackup: innodb_log_file_size = 5242880xtrabackup: Starting InnoDB instance for recovery.xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)InnoDB: The InnoDB memory heap is disabled110110 23:26:41 InnoDB: Log file ./ib_logfile0 did not exist: new to be createdInnoDB: Setting log file ./ib_logfile0 size to 5 MBInnoDB: Database physically writes the file full: wait…110110 23:26:41 InnoDB: Log file ./ib_logfile1 did not exist: new to be createdInnoDB: Setting log file ./ib_logfile1 size to 5 MBInnoDB: Database physically writes the file full: wait…InnoDB: The log sequence number in ibdata files does not matchInnoDB: the log sequence number in the ib_logfiles!110110 23:26:41 InnoDB: Database was not shut down normally!InnoDB: Starting crash recovery.InnoDB: Reading tablespace information from the .ibd files…110110 23:26:41 InnoDB: Started; log sequence number 0 46092[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 = 1110110 23:26:41 InnoDB: Starting shutdown…InnoDB: Warning: some resources were not cleaned up in shutdown:InnoDB: threads 0, events 0, os_mutexes 0, os_fast_mutexes 18446744073709551615110110 23:26:42 InnoDB: Shutdown completed; log sequence number 0 46092110110 23:26:42 innobackupex-1.5.1: completed OK!