Bug #53497 Wrong BackupDataDir default in documentation
Submitted: 7 May 2010 16:11 Modified: 10 May 2010 14:44
Reporter: Hartmut Holzgraefe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:ALL OS:Linux
Assigned to: Jon Stephens CPU Architecture:Any
Tags: BackupDataDir, ndb, ndbd

[7 May 2010 16:11] Hartmut Holzgraefe
Description:
http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-ndbd-definition.html#ndbparam-ndbd-ba...

says:

* BackupDataDir
  Restart Type 	initial, node
  Permitted Values
    Type 	string
    Default 	FileSystemPath/BACKUP
    Range 	-

ndb_config shows the same values for FileSystemPath and BackupDataDir though if BackupDataDir isn't set explicitly. The /BACKUP part is only added later when an actual backup is created

How to repeat:
see storage/ndb/src/mgmsrv/ConfigInfo.cpp

3737 bool
3738 fixFileSystemPath(InitConfigFileParser::Context & ctx, const char * data){
3739   DBUG_ENTER("fixFileSystemPath");
3740 
3741   const char * path;
3742   if (ctx.m_currentSection->get("FileSystemPath", &path))
3743     DBUG_RETURN(true);
3744 
3745   if (ctx.m_currentSection->get("DataDir", &path)) {
3746     require(ctx.m_currentSection->put("FileSystemPath", path));
3747     DBUG_RETURN(true);
3748   }
3749 
3750   require(false);
3751   DBUG_RETURN(false);
3752 }

and storage/ndb/src/kernel/blocks/ndbfs/Filename.cpp:

128     BaseString::snprintf(buf, sizeof(buf), "BACKUP%sBACKUP-%u%s",
129              DIR_SEPARATOR, seq, DIR_SEPARATOR);
130     strcat(theName, buf);
131     if(count == 0xffffffff) {
132       BaseString::snprintf(buf, sizeof(buf), "BACKUP-%u.%d",
133                seq, nodeId); strcat(theName, buf);
134     } else {
135       BaseString::snprintf(buf, sizeof(buf), "BACKUP-%u-%d.%d",
136                seq, count, nodeId); strcat(theName, buf);
137     }
[7 May 2010 16:14] Hartmut Holzgraefe
and the output of ndb_config:

$ ndb_config --type=ndbd -q Id,FileSystemPath,BackupDataDir -r\\n
2,/vol/mysql/installations/ndb-7.0.14/cluster,/vol/mysql/installations/ndb-7.0.14/cluster
3,/vol/mysql/installations/ndb-7.0.14/cluster,/vol/mysql/installations/ndb-7.0.14/cluster
[10 May 2010 13:32] Jon Stephens
Corrected category and lead.
[10 May 2010 13:35] Jon Stephens
Looks to me like any problem there might be is with ndb_config, not the documentation, since the backups do in fact get placed in FileSystemPath/BACKUP if BackupDataDir isn't set, correct?
[10 May 2010 14:14] Jon Stephens
Need to add a note to the documentation making it clear that '/BACKUP' is always added to the backup path, regardless.
[10 May 2010 14:44] Jon Stephens
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.