innobackupex does not copy back table files in subfolders from NFS mount

Bug #1003518 reported by Stefan Greiner on 2012-05-23
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to
Fix Released
Alexey Kopytov
Won't Fix
Fix Released
Alexey Kopytov
Fix Released
Alexey Kopytov

Bug Description

Hi there,

our situation:
MySQL Server on Debian Squeeze with percona-xtrabackup
Backup Fileserver: Windows 2008R2

Backups are created with innobackupex.
The backup target is a mounted folder via NFS from the WINDOWS Fileserver.
example: /nfs_folder/2012-05-23_16-14-39/

When I want to use --copy-back it only copies back the files directly under /nfs_folder/2012-05-23_16-14-39/ and not the files under /nfs_folder/2012-05-23_16-14-39/db_name/

Reason: innobackupex uses the find() function from the /usr/share/perl/5.10.1/File/ perl lib. This library has an optimization when running on linux to count the links under a folder. In Linux the count for a folder is greater or equal to 2. When it is 2 then perl running on linux thinks it has no subfolders because . and .. are the 2 ones. Any subfolder unter a common linux filesystem would increase that counter (e.g. with db_name folder it would be 3, with the mysql database it would be 4 and so on). BUT: the files and folders come from an NFS mount based on NTFS. That means: the counter is always 2. So there is no need to check for subfolders (It would be - but Perl thinks not)
You can see it when running in shell:
(Links will be 2)
stat /nfs_folder
stat /nfs_folder/2012-05-23_16-14-39/
(Links will be 2 + number of subfolders)
stat /home/user/aFolderWithFilesAndSubfolders

Solution: implement the following line of code to disable that optimization at the beginning (line 42) of innobackupex


Thank you so far.


Related branches

description: updated
description: updated
Alexey Kopytov (akopytov) wrote :


Thank you so much for providing a detailed bug report and problem analysis.

description: updated

Percona now uses JIRA for bug reports so this bug report is migrated to:

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers