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

Reported by Stefan Greiner on 2012-05-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup
Low
Alexey Kopytov
1.6
Low
Unassigned
2.0
Low
Alexey Kopytov
2.1
Low
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/Find.pm 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

$File::Find::dont_use_nlink=1;

Thank you so far.

Regards,
Stefan

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

Stefan,

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

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

Other bug subscribers