innobackupex treats files as folders during incremental

Bug #718204 reported by Valentine Gostev on 2011-02-13
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup
Low
Unassigned
2.0
Low
Unassigned
2.1
Low
Unassigned
2.2
Low
Unassigned
2.3
Low
Unassigned

Bug Description

innobackupex treats regular files located in backup root directory as folders and tries to look up full backup's metadata there:

[root@dev10 ~]# ls -lah /root/backup/
total 1.5M
drwxr-xr-x 4 root root 4.0K Feb 13 14:56 .
drwxr-x--- 10 root root 4.0K Feb 13 14:38 ..
drwxr-xr-x 4 root root 4.0K Feb 13 14:50 2011-02-13_14-49-57
-rw-r--r-- 1 root root 1.5M Feb 13 14:52 full.tar.gz
[root@dev10 ~]#

[root@dev10 ~]# innobackupex --incremental /root/backup

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy.
All Rights Reserved.

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

110213 14:56:42 innobackupex: Starting mysql with options: --unbuffered --
110213 14:56:42 innobackupex: Connected to database with mysql child process (pid=11600)
110213 14:56:49 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.1.54, for unknown-linux-gnu (x86_64) using readline 5.1
innobackupex: Using mysql server version Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

innobackupex: Created backup directory /root/backup/2011-02-13_14-56-49
110213 14:56:49 innobackupex: Starting mysql with options: --unbuffered --
110213 14:56:49 innobackupex: Connected to database with mysql child process (pid=11624)
110213 14:56:53 innobackupex: Connection to database server closed

110213 14:56:53 innobackupex: Starting ibbackup with command: xtrabackup --backup --suspend-at-end --target-dir=/root/backup/2011-02-13_14-56-49 --incremental-basedir='/root/backup/full.tar.gz'
innobackupex: Waiting for ibbackup (pid=11635) to suspend
innobackupex: Suspend file '/root/backup/2011-02-13_14-56-49/xtrabackup_suspended'
xtrabackup: Error: cannot open /root/backup/full.tar.gz/xtrabackup_checkpoints
xtrabackup: error: failed to read metadata from /root/backup/full.tar.gz/xtrabackup_checkpoints
innobackupex: Error: ibbackup child process has died at /usr/bin/innobackupex line 562.
[root@dev10 ~]#

So it turns out that when innobackupex just takes the latest object from the backup root directory and does not check either it is a file or folder.

I suggest that innobackupex should pick the folder as a base for incremental backup basing on facts when the object inside backup root is a directory and it is named with a timestamps (like the names of the folders innobackupex creates)

Changed in percona-xtrabackup:
status: New → Confirmed
importance: Undecided → Low
importance: Low → Medium
assignee: nobody → Vadim Tkachenko (vadim-tk)
Vadim Tkachenko (vadim-tk) wrote :

You should explicitly specify --incremental-basedir= along with --incremental option.

Vadim Tkachenko (vadim-tk) wrote :

i.e proper usage is
innobackupex --incremental --incremental-basedir=/mnt/tachion/xtrab/2011-02-11_14-34-49 /mnt/tachion/xtrab/full

Valentine Gostev (longbow) wrote :

if innobackupex allows us to run with --incremental without explicit specifying basedir folder it should work correctly, we may fix it in several ways:

1. Let innobackupex work correctly when we do incremental backup w/out specifying base folder

2. Prohibit usage with --incremental w/out --incremental-basedir

3. Combine options --incremental and --incremental-basedir, and leave one option --incremental-basedir, which will work as a trigger that we do incremental backup and at the same moment it will pass the base folder to xtrabackup

Download full text (4.0 KiB)

Valentine,

I think it makes sense to go with way N2.

Automatic way can't be error-free, and it is not good when you deal
with backups.

On Sun, Feb 13, 2011 at 10:03 AM, Valentine Gostev
<email address hidden> wrote:
> if innobackupex allows us to run with --incremental without explicit
> specifying basedir folder it should work correctly, we may fix it in
> several ways:
>
> 1. Let innobackupex work correctly when we do incremental backup w/out
> specifying base folder
>
> 2. Prohibit usage with --incremental w/out --incremental-basedir
>
> 3. Combine options --incremental and --incremental-basedir, and leave
> one option --incremental-basedir, which will work as a trigger that we
> do incremental backup and at the same moment it will pass the base
> folder to xtrabackup
>
> --
> You received this bug notification because you are a member of Percona
> developers, which is the registrant for Percona-XtraBackup.
> https://bugs.launchpad.net/bugs/718204
>
> Title:
>  innobackupex treats files as folders during incremental
>
> Status in Open source backup tool for InnoDB and XtraDB:
>  Confirmed
>
> Bug description:
>  innobackupex treats regular files located in backup root directory as
>  folders and tries to look up full backup's metadata there:
>
>  [root@dev10 ~]# ls -lah /root/backup/
>  total 1.5M
>  drwxr-xr-x  4 root root 4.0K Feb 13 14:56 .
>  drwxr-x--- 10 root root 4.0K Feb 13 14:38 ..
>  drwxr-xr-x  4 root root 4.0K Feb 13 14:50 2011-02-13_14-49-57
>  -rw-r--r--  1 root root 1.5M Feb 13 14:52 full.tar.gz
>  [root@dev10 ~]#
>
>
>  [root@dev10 ~]# innobackupex --incremental /root/backup
>
>  InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy.
>  All Rights Reserved.
>
>  This software is published under
>  the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
>
>  110213 14:56:42  innobackupex: Starting mysql with options:  --unbuffered --
>  110213 14:56:42  innobackupex: Connected to database with mysql child process (pid=11600)
>  110213 14:56:49  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.1.54, for unknown-linux-gnu (x86_64) using readline 5.1
>  innobackupex: Using mysql server version Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
>
>  innobackupex: Created backup directory /root/backup/2011-02-13_14-56-49
>  110213 14:56:49  innobackupex: Starting mysql with options:  --unbuffered --
>  110213 14:56:49  innobackupex: Connected to database with mysql child process (pid=11624)
>  110213 14:56:53  innobackupex: Connection to database server closed
>
>  110213 14:56:53  innobackupex: Starting ibbackup with command: xtrabackup --backup --suspend-at-end --target-dir=/root/backup/2011-02-13_14-56-49 --incremental-basedir='/root/backup/full.tar.gz'
>  innobackupex: Waiting for ibbackup (pid=11635) to suspend
>  innobackupex: Suspend file '/root/backup/2011-02-13_14-56-49/xtrabackup_suspended'
>  xtrabackup: Error: cannot open /root/backup/full.tar...

Read more...

Stewart Smith (stewart) on 2011-05-20
Changed in percona-xtrabackup:
status: Confirmed → Triaged
assignee: Vadim Tkachenko (vadim-tk) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers