<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="mysql-cluster-backup-concepts">
      </a>
      25.6.8.1 NDB Cluster Backup Concepts
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045092145968">
  </a>
  <a class="indexterm" name="idm46045092144480">
  </a>
  <p>
   A backup is a snapshot of the database at a given time. The
        backup consists of three main parts:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <b>
       Metadata.
      </b>
      The names and definitions of all database tables
     </p>
    </li>
    <li class="listitem">
     <p>
      <b>
       Table records.
      </b>
      The data actually stored in the database tables at the
              time that the backup was made
     </p>
    </li>
    <li class="listitem">
     <p>
      <b>
       Transaction log.
      </b>
      A sequential record telling how and when data was stored
              in the database
     </p>
    </li>
   </ul>
  </div>
  <p>
   Each of these parts is saved on all nodes participating in the
        backup. During backup, each node saves these three parts into
        three files on disk:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="filename">
       BACKUP-
       <em class="replaceable">
        <code>
         backup_id
        </code>
       </em>
       .
       <em class="replaceable">
        <code>
         node_id
        </code>
       </em>
       .ctl
      </code>
     </p>
     <p>
      A control file containing control information and metadata.
            Each node saves the same table definitions (for all tables
            in the cluster) to its own version of this file.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="filename">
       BACKUP-
       <em class="replaceable">
        <code>
         backup_id
        </code>
       </em>
       -0.
       <em class="replaceable">
        <code>
         node_id
        </code>
       </em>
       .data
      </code>
     </p>
     <p>
      A data file containing the table records, which are saved on
            a per-fragment basis. That is, different nodes save
            different fragments during the backup. The file saved by
            each node starts with a header that states the tables to
            which the records belong. Following the list of records
            there is a footer containing a checksum for all records.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="filename">
       BACKUP-
       <em class="replaceable">
        <code>
         backup_id
        </code>
       </em>
       .
       <em class="replaceable">
        <code>
         node_id
        </code>
       </em>
       .log
      </code>
     </p>
     <p>
      A log file containing records of committed transactions.
            Only transactions on tables stored in the backup are stored
            in the log. Nodes involved in the backup save different
            records because different nodes host different database
            fragments.
     </p>
    </li>
   </ul>
  </div>
  <p>
   In the listing just shown,
   <em class="replaceable">
    <code>
     backup_id
    </code>
   </em>
   stands for the backup identifier and
   <em class="replaceable">
    <code>
     node_id
    </code>
   </em>
   is the unique identifier for
        the node creating the file.
  </p>
  <p>
   The location of the backup files is determined by the
   <a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-backupdatadir">
    <code class="literal">
     BackupDataDir
    </code>
   </a>
   parameter.
  </p>
 </div>
 <br/>
</div>
