Bug #59958 MEB fails when backup-directory location is chain of sub directories
Submitted: 5 Feb 2011 0:36 Modified: 8 Aug 2011 23:38
Reporter: Hema Sridharan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Backup Severity:S3 (Non-critical)
Version:MEB 3.6 OS:Linux
Assigned to: CPU Architecture:Any

[5 Feb 2011 0:36] Hema Sridharan
Description:
Create a symbolic link for backup directory in itself. This will form infinite loop.
Now execute MEB where backup directory location is pointing to symbolic link.
MEB will fail such when backup-dir is pointed to more than 21 sub directories or symbolic links pointing to itself.

How to repeat:
[hs221732@fimafeng10]/export/home2/tmp: mkdir bkpdir
[hs221732@fimafeng10]/export/home2/tmp: ln -s /export/home2/tmp/bkpdir bkpdir/
This will form infinite loop of bkpdir

Now execute MEB

./mysqlbackup --datadir=/export/home2/tmp/mysql-5.1-meb-testing/mysql-test/var/mysqld.1/data/  --innodb_log_file_size=5M --innodb_log_files_in_group=4 --backup_innodb_log_files_in_group=4 --backup_innodb_log_file_size=5M --innodb_data_home_dir=/export/home2/tmp/mysql-5.1-meb-testing/mysql-test/var/mysqld.1/data/ --backup-dir=/export/home2/tmp/bkpdir/bkpdir/bkpdir/bkpdir/bkpdir/bkpdir/bkpdir/bkpdir/bkpdir/bkpdir/bkpdir/bkpdir/bkpdir/bkpdir/bkpdir/bkpdir/bkpdir/bkpdir/bkpdir/bkpdir/bkpdir/bkpdir/ --socket=/export/home2/tmp/mysql-5.1-meb-testing/mysql-test/var/tmp/mysqld.1.sock --user=root --port=13000 --protocol=tcp backup                       
Note that there are up to 21 sub directories of "bkpdir" for which backup passes but fails for 22nd onwards and gives the following error

Error: Failed to do configuration check of directories.
       Possible failure from my_realpath() call.

The same failure can happen if the backup directory is made as chain of sub directories. MEB can handle only up to certain limit for sub directories and same rule applies for symbolic links also.

We need to document this max limit that MEB can handle for backup directories.
[5 Feb 2011 13:24] Sveta Smirnova
Thank you for the report.

Verified as described.
[8 Aug 2011 23:38] John Russell
Added to MEB 3.6 change log: 

Documented the maximum number of subdirectories (21) allowed in the 
backup-dir path. 

Also added this info to Appendix A, "Known Bugs and Limitations".