<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="mysql-cluster-ndbinfo-backup-id">
      </a>
      25.6.17.3 The ndbinfo backup_id Table
     </h4>
    </div>
   </div>
  </div>
  <p>
   This table provides a way to find the ID of the backup started
        most recently for this cluster.
  </p>
  <p>
   The
   <code class="literal">
    backup_id
   </code>
   table contains a single column
   <code class="literal">
    id
   </code>
   , which corresponds to a backup ID taken
        using the
   <a class="link" href="mysql-cluster-programs-ndb-mgm.html" title="25.5.5 ndb_mgm — The NDB Cluster Management Client">
    <span class="command">
     <strong>
      ndb_mgm
     </strong>
    </span>
   </a>
   client
   <a class="link" href="mysql-cluster-backup-using-management-client.html" title="25.6.8.2 Using The NDB Cluster Management Client to Create a Backup">
    <code class="literal">
     START BACKUP
    </code>
   </a>
   command. This
        table contains a single row.
  </p>
  <p>
   <span class="emphasis">
    <em>
     Example
    </em>
   </span>
   : Assume the following sequence of
   <code class="literal">
    START BACKUP
   </code>
   commands issued in the NDB
        management client, with no other backups taken since the cluster
        was first started:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-ndbmgm"><div class="docs-select-all right" id="sa56227189"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-ndbmgm"><span class="token prompt">ndb_mgm&gt;</span> <span class="token keyword">START BACKUP</span>
Waiting for completed<span class="token punctuation">,</span> this may take several minutes
<span class="token selector">Node 5:</span> Backup 1 started from node 50
<span class="token selector">Node 5:</span> Backup 1 started from node 50 completed
 StartGCP<span class="token operator">:</span> 27894 StopGCP<span class="token operator">:</span> 27897
 #Records<span class="token operator">:</span> 2057 #LogRecords<span class="token operator">:</span> 0
 Data<span class="token operator">:</span> 51580 bytes Log<span class="token operator">:</span> 0 bytes
<span class="token prompt">ndb_mgm&gt;</span> <span class="token keyword">START BACKUP</span> 5
Waiting for completed<span class="token punctuation">,</span> this may take several minutes
<span class="token selector">Node 5:</span> Backup 5 started from node 50
<span class="token selector">Node 5:</span> Backup 5 started from node 50 completed
 StartGCP<span class="token operator">:</span> 27905 StopGCP<span class="token operator">:</span> 27908
 #Records<span class="token operator">:</span> 2057 #LogRecords<span class="token operator">:</span> 0
 Data<span class="token operator">:</span> 51580 bytes Log<span class="token operator">:</span> 0 bytes
<span class="token prompt">ndb_mgm&gt;</span> <span class="token keyword">START BACKUP</span>
Waiting for completed<span class="token punctuation">,</span> this may take several minutes
<span class="token selector">Node 5:</span> Backup 6 started from node 50
<span class="token selector">Node 5:</span> Backup 6 started from node 50 completed
 StartGCP<span class="token operator">:</span> 27912 StopGCP<span class="token operator">:</span> 27915
 #Records<span class="token operator">:</span> 2057 #LogRecords<span class="token operator">:</span> 0
 Data<span class="token operator">:</span> 51580 bytes Log<span class="token operator">:</span> 0 bytes
<span class="token prompt">ndb_mgm&gt;</span> <span class="token keyword">START BACKUP</span> 3
Connected to Management Server at<span class="token operator">:</span> localhost<span class="token operator">:</span>1186 <span class="token punctuation">(</span>using cleartext<span class="token punctuation">)</span>
Waiting for completed<span class="token punctuation">,</span> this may take several minutes
<span class="token selector">Node 5:</span> Backup 3 started from node 50
<span class="token selector">Node 5:</span> Backup 3 started from node 50 completed
 StartGCP<span class="token operator">:</span> 28149 StopGCP<span class="token operator">:</span> 28152
 #Records<span class="token operator">:</span> 2057 #LogRecords<span class="token operator">:</span> 0
 Data<span class="token operator">:</span> 51580 bytes Log<span class="token operator">:</span> 0 bytes
<span class="token prompt">ndb_mgm&gt;</span></code></pre>
  </div>
  <p>
   After this, the
   <code class="literal">
    backup_id
   </code>
   table contains the
        single row shown here, using the
   <a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
    <span class="command">
     <strong>
      mysql
     </strong>
    </span>
   </a>
   client:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa43685603"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">USE</span> ndbinfo<span class="token punctuation">;</span>

<span class="token keyword">Database</span> <span class="token keyword">changed</span>
<span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> backup_id<span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> id   <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span>    3 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">1 row in set (0.00 sec)</span></code></pre>
  </div>
  <p>
   If no backups can be found, the table contains a single row with
   <code class="literal">
    0
   </code>
   as the
   <code class="literal">
    id
   </code>
   value.
  </p>
 </div>
 <br/>
</div>
