<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="mysql-cluster-backup-using-management-client">
      </a>
      25.6.8.2 Using The NDB Cluster Management Client to Create a Backup
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045092122352">
  </a>
  <a class="indexterm" name="idm46045092120864">
  </a>
  <p>
   Before starting a backup, make sure that the cluster is properly
        configured for performing one. (See
   <a class="xref" href="mysql-cluster-backup-configuration.html" title="25.6.8.3 Configuration for NDB Cluster Backups">
    Section 25.6.8.3, “Configuration for NDB Cluster Backups”
   </a>
   .)
  </p>
  <a class="indexterm" name="idm46045092118144">
  </a>
  <p>
   The
   <code class="literal">
    START BACKUP
   </code>
   command is used to create a
        backup, and has the syntax shown here:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-simple"><div class="docs-select-all right" id="sa54719513"><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-simple">START BACKUP <span class="token punctuation">[</span><em class="replaceable">backup_id</em><span class="token punctuation">]</span>
    <span class="token punctuation">[</span><em class="replaceable">encryption_option</em><span class="token punctuation">]</span>
    <span class="token punctuation">[</span><em class="replaceable">wait_option</em><span class="token punctuation">]</span>
    <span class="token punctuation">[</span><em class="replaceable">snapshot_option</em><span class="token punctuation">]</span>

<em class="replaceable">encryption_option</em><span class="token operator">:</span>
ENCRYPT <span class="token punctuation">[</span>PASSWORD<span class="token operator">=</span><em class="replaceable">password</em><span class="token punctuation">]</span>

<em class="replaceable">password</em><span class="token operator">:</span>
<span class="token punctuation">{</span>'<em class="replaceable">password_string</em>' <span class="token operator">|</span> "<em class="replaceable">password_string</em>"<span class="token punctuation">}</span>

<em class="replaceable">wait_option</em><span class="token operator">:</span>
WAIT <span class="token punctuation">{</span>STARTED <span class="token operator">|</span> COMPLETED<span class="token punctuation">}</span> <span class="token operator">|</span> NOWAIT

<em class="replaceable">snapshot_option</em><span class="token operator">:</span>
SNAPSHOTSTART <span class="token operator">|</span> SNAPSHOTEND</code></pre>
  </div>
  <p>
   Successive backups are automatically identified sequentially, so
        the
   <em class="replaceable">
    <code>
     backup_id
    </code>
   </em>
   , an integer greater
        than or equal to 1, is optional; if it is omitted, the next
        available value is used. If an existing
   <em class="replaceable">
    <code>
     backup_id
    </code>
   </em>
   value is used, the backup
        fails with the error
   <span class="errortext">
    Backup failed: file already
        exists
   </span>
   . If used, the
   <em class="replaceable">
    <code>
     backup_id
    </code>
   </em>
   must follow immediately
        after the
   <code class="literal">
    START BACKUP
   </code>
   keywords, before any
        other options are used.
  </p>
  <p>
   <code class="literal">
    START BACKUP
   </code>
   supports the creation of
        encrypted backups using
   <code class="literal">
    ENCRYPT
        PASSWORD=
    <em class="replaceable">
     <code>
      password
     </code>
    </em>
   </code>
   . The
   <em class="replaceable">
    <code>
     password
    </code>
   </em>
   must meet all of the
        following requirements:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      Uses any of the printable ASCII characters except
      <code class="literal">
       !
      </code>
      ,
      <code class="literal">
       '
      </code>
      ,
      <code class="literal">
       "
      </code>
      ,
      <code class="literal">
       $
      </code>
      ,
      <code class="literal">
       %
      </code>
      ,
      <code class="literal">
       \
      </code>
      , and
      <code class="literal">
       ^
      </code>
     </p>
    </li>
    <li class="listitem">
     <p>
      Is no more than 256 characters in length
     </p>
    </li>
    <li class="listitem">
     <p>
      Is enclosed by single or double quotation marks
     </p>
    </li>
   </ul>
  </div>
  <p>
   When
   <code class="literal">
    ENCRYPT
        PASSWORD='
    <em class="replaceable">
     <code>
      password
     </code>
    </em>
    '
   </code>
   is
        used, the backup data record and log files written by each data
        node are encrypted with a key derived from the user-provided
   <em class="replaceable">
    <code>
     password
    </code>
   </em>
   and a randomly-generated
        salt using a key derivation function (KDF) that employs the
        PBKDF2-SHA256 algorithm to generate a symmetric encryption key
        for that file. This function has the form shown here:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-simple"><div class="docs-select-all right" id="sa53968037"><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-simple">key <span class="token operator">=</span> KDF<span class="token punctuation">(</span><em class="replaceable">random_salt</em><span class="token punctuation">,</span> <em class="replaceable">password</em><span class="token punctuation">)</span></code></pre>
  </div>
  <p>
   The key so generated is then used to encrypt the backup data
        using AES 256 CBC inline, and symmetric encryption is employed
        for encrypting the backup fileset (with the generated key).
  </p>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Note
   </div>
   <p>
    NDB Cluster
    <span class="emphasis">
     <em>
      never
     </em>
    </span>
    saves the
          user-furnished password or generated encryption key.
   </p>
  </div>
  <p>
   The
   <code class="literal">
    PASSWORD
   </code>
   option can be omitted from
   <em class="replaceable">
    <code>
     encryption_option
    </code>
   </em>
   . In this case, the
        management client prompts the user for a password.
  </p>
  <p>
   It is possible using
   <code class="literal">
    PASSWORD
   </code>
   to set an empty
        password (
   <code class="literal">
    ''
   </code>
   or
   <code class="literal">
    ""
   </code>
   ), but
        this is not recommended.
  </p>
  <p>
   An encrypted backup can be decrypted using any of the following
        commands:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a class="link" href="mysql-cluster-programs-ndb-restore.html" title="25.5.23 ndb_restore — Restore an NDB Cluster Backup">
       <span class="command">
        <strong>
         ndb_restore
        </strong>
       </span>
      </a>
      <a class="link" href="mysql-cluster-programs-ndb-restore.html#option_ndb_restore_decrypt">
       <code class="option">
        --decrypt
       </code>
      </a>
      <a class="link" href="mysql-cluster-programs-ndb-restore.html#option_ndb_restore_backup-password">
       <code class="option">
        --backup-password=
        <em class="replaceable">
         <code>
          password
         </code>
        </em>
       </code>
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="mysql-cluster-programs-ndbxfrm.html" title="25.5.32 ndbxfrm — Compress, Decompress, Encrypt, and Decrypt Files Created by NDB Cluster">
       <span class="command">
        <strong>
         ndbxfrm
        </strong>
       </span>
      </a>
      <a class="link" href="mysql-cluster-programs-ndbxfrm.html#option_ndbxfrm_decrypt-password">
       <code class="option">
        --decrypt-password=
        <em class="replaceable">
         <code>
          password
         </code>
        </em>
       </code>
      </a>
      <em class="replaceable">
       <code>
        input_file
       </code>
      </em>
      <em class="replaceable">
       <code>
        output_file
       </code>
      </em>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="mysql-cluster-programs-ndb-print-backup-file.html" title="25.5.17 ndb_print_backup_file — Print NDB Backup File Contents">
       <span class="command">
        <strong>
         ndb_print_backup_file
        </strong>
       </span>
      </a>
      <a class="link" href="mysql-cluster-programs-ndb-print-backup-file.html#option_ndb_print_backup_file_backup-password">
       <code class="option">
        -P
       </code>
      </a>
      <em class="replaceable">
       <code>
        password
       </code>
      </em>
      <em class="replaceable">
       <code>
        file_name
       </code>
      </em>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="mysql-cluster-programs-ndb-restore.html" title="25.5.23 ndb_restore — Restore an NDB Cluster Backup">
       <span class="command">
        <strong>
         ndb_restore
        </strong>
       </span>
      </a>
      <a class="link" href="mysql-cluster-programs-ndb-restore.html#option_ndb_restore_decrypt">
       <code class="option">
        --decrypt
       </code>
      </a>
      <a class="link" href="mysql-cluster-programs-ndb-restore.html#option_ndb_restore_backup-password-from-stdin">
       <code class="option">
        --backup-password-from-stdin
       </code>
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="mysql-cluster-programs-ndbxfrm.html" title="25.5.32 ndbxfrm — Compress, Decompress, Encrypt, and Decrypt Files Created by NDB Cluster">
       <span class="command">
        <strong>
         ndbxfrm
        </strong>
       </span>
      </a>
      <a class="link" href="mysql-cluster-programs-ndbxfrm.html#option_ndbxfrm_decrypt-password-from-stdin">
       <code class="option">
        --decrypt-password-from-stdin
       </code>
      </a>
      <em class="replaceable">
       <code>
        input_file
       </code>
      </em>
      <em class="replaceable">
       <code>
        output_file
       </code>
      </em>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="mysql-cluster-programs-ndb-print-backup-file.html" title="25.5.17 ndb_print_backup_file — Print NDB Backup File Contents">
       <span class="command">
        <strong>
         ndb_print_backup_file
        </strong>
       </span>
      </a>
      <a class="link" href="mysql-cluster-programs-ndb-print-backup-file.html#option_ndb_print_backup_file_backup-password">
       <code class="option">
        --backup-password=
        <em class="replaceable">
         <code>
          password
         </code>
        </em>
       </code>
      </a>
      <em class="replaceable">
       <code>
        file_name
       </code>
      </em>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="mysql-cluster-programs-ndb-print-backup-file.html" title="25.5.17 ndb_print_backup_file — Print NDB Backup File Contents">
       <span class="command">
        <strong>
         ndb_print_backup_file
        </strong>
       </span>
      </a>
      <a class="link" href="mysql-cluster-programs-ndb-print-backup-file.html#option_ndb_print_backup_file_backup-password-from-stdin">
       <code class="option">
        --backup-password-from-stdin
       </code>
      </a>
      <em class="replaceable">
       <code>
        file_name
       </code>
      </em>
     </p>
    </li>
    <li class="listitem">
     <p>
      <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>
      <a class="link" href="mysql-cluster-programs-ndb-mgm.html#option_ndb_mgm_backup-password-from-stdin">
       <code class="option">
        --backup-password-from-stdin
       </code>
      </a>
      <a class="link" href="mysql-cluster-programs-ndb-mgm.html#option_ndb_mgm_execute">
       <code class="option">
        --execute "START BACKUP ..."
       </code>
      </a>
     </p>
    </li>
   </ul>
  </div>
  <p>
   See the descriptions of these programs for more information,
        such as additional options that may be required.
  </p>
  <p>
   The
   <em class="replaceable">
    <code>
     wait_option
    </code>
   </em>
   can be used to
        determine when control is returned to the management client
        after a
   <code class="literal">
    START BACKUP
   </code>
   command is issued, as
        shown in the following list:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a class="indexterm" name="idm46045092050784">
      </a>
      <a class="indexterm" name="idm46045092049296">
      </a>
      If
      <code class="literal">
       NOWAIT
      </code>
      is specified, the management
            client displays a prompt immediately, as seen here:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-ndbmgm"><div class="docs-select-all right" id="sa33229510"><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> <span class="token keyword">NOWAIT</span>
<span class="token prompt">ndb_mgm&gt;</span></code></pre>
     </div>
     <p>
      In this case, the management client can be used even while
            it prints progress information from the backup process.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="indexterm" name="idm46045092044368">
      </a>
      <a class="indexterm" name="idm46045092042880">
      </a>
      With
      <code class="literal">
       WAIT STARTED
      </code>
      the management client
            waits until the backup has started before returning control
            to the user, as shown here:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-ndbmgm"><div class="docs-select-all right" id="sa28486569"><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> <span class="token keyword">WAIT</span> <span class="token keyword">STARTED</span>
Waiting for started<span class="token punctuation">,</span> this may take several minutes
<span class="token selector">Node 2:</span> Backup 3 started from node 1
<span class="token prompt">ndb_mgm&gt;</span></code></pre>
     </div>
    </li>
    <li class="listitem">
     <p>
      <a class="indexterm" name="idm46045092038272">
      </a>
      <a class="indexterm" name="idm46045092036784">
      </a>
      <strong class="userinput">
       <code>
        WAIT COMPLETED
       </code>
      </strong>
      causes the management
            client to wait until the backup process is complete before
            returning control to the user.
     </p>
    </li>
   </ul>
  </div>
  <p>
   <code class="literal">
    WAIT COMPLETED
   </code>
   is the default.
  </p>
  <p>
   <a class="indexterm" name="idm46045092033104">
   </a>
   <a class="indexterm" name="idm46045092031616">
   </a>
   <a class="indexterm" name="idm46045092030528">
   </a>
   <a class="indexterm" name="idm46045092029040">
   </a>
   A
   <em class="replaceable">
    <code>
     snapshot_option
    </code>
   </em>
   can be used to
        determine whether the backup matches the state of the cluster
        when
   <code class="literal">
    START BACKUP
   </code>
   was issued, or when it was
        completed.
   <code class="literal">
    SNAPSHOTSTART
   </code>
   causes the backup to
        match the state of the cluster when the backup began;
   <code class="literal">
    SNAPSHOTEND
   </code>
   causes the backup to reflect the
        state of the cluster when the backup was finished.
   <code class="literal">
    SNAPSHOTEND
   </code>
   is the default, and matches the
        behavior found in previous NDB Cluster releases.
  </p>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Note
   </div>
   <p>
    If you use the
    <code class="literal">
     SNAPSHOTSTART
    </code>
    option with
    <code class="literal">
     START BACKUP
    </code>
    , and the
    <a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-compressedbackup">
     <code class="literal">
      CompressedBackup
     </code>
    </a>
    parameter is enabled, only the data and control files are
          compressed—the log file is not compressed.
   </p>
  </div>
  <p>
   If both a
   <em class="replaceable">
    <code>
     wait_option
    </code>
   </em>
   and a
   <em class="replaceable">
    <code>
     snapshot_option
    </code>
   </em>
   are used, they may be
        specified in either order. For example, all of the following
        commands are valid, assuming that there is no existing backup
        having 4 as its ID:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-simple"><div class="docs-select-all right" id="sa97721612"><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-simple">START BACKUP WAIT STARTED SNAPSHOTSTART
START BACKUP SNAPSHOTSTART WAIT STARTED
START BACKUP 4 WAIT COMPLETED SNAPSHOTSTART
START BACKUP SNAPSHOTEND WAIT COMPLETED
START BACKUP 4 NOWAIT SNAPSHOTSTART</code></pre>
  </div>
  <p>
   The procedure for creating a backup consists of the following
        steps:
  </p>
  <div class="orderedlist">
   <ol class="orderedlist" type="1">
    <li class="listitem">
     <p>
      Start the management client (
      <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>
      ), if
            it not running already.
     </p>
    </li>
    <li class="listitem">
     <p>
      Execute the
      <strong class="userinput">
       <code>
        START BACKUP
       </code>
      </strong>
      command.
            This produces several lines of output indicating the
            progress of the backup, as shown here:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-ndbmgm"><div class="docs-select-all right" id="sa82770198"><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 2:</span> Backup 1 started from node 1
<span class="token selector">Node 2:</span> Backup 1 started from node 1 completed
 StartGCP<span class="token operator">:</span> 177 StopGCP<span class="token operator">:</span> 180
 #Records<span class="token operator">:</span> 7362 #LogRecords<span class="token operator">:</span> 0
 Data<span class="token operator">:</span> 453648 bytes Log<span class="token operator">:</span> 0 bytes
<span class="token prompt">ndb_mgm&gt;</span></code></pre>
     </div>
    </li>
    <li class="listitem">
     <p>
      <a class="indexterm" name="idm46045092010016">
      </a>
      <a class="indexterm" name="idm46045092008512">
      </a>
      When the backup has started the management client displays
            this message:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-ndbmgm"><div class="docs-select-all right" id="sa54075452"><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">Backup <em class="replaceable">backup_id</em> started from node <em class="replaceable">node_id</em></code></pre>
     </div>
     <p>
      <em class="replaceable">
       <code>
        backup_id
       </code>
      </em>
      is the unique
            identifier for this particular backup. This identifier is
            saved in the cluster log, if it has not been configured
            otherwise.
      <em class="replaceable">
       <code>
        node_id
       </code>
      </em>
      is the
            identifier of the management server that is coordinating the
            backup with the data nodes. At this point in the backup
            process the cluster has received and processed the backup
            request. It does not mean that the backup has finished. An
            example of this statement is shown here:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-ndbmgm"><div class="docs-select-all right" id="sa45543041"><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 selector">Node 2:</span> Backup 1 started from node 1</code></pre>
     </div>
    </li>
    <li class="listitem">
     <p>
      The management client indicates with a message like this one
            that the backup has started:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-ndbmgm"><div class="docs-select-all right" id="sa90060498"><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">Backup <em class="replaceable">backup_id</em> started from node <em class="replaceable">node_id</em> completed</code></pre>
     </div>
     <p>
      As is the case for the notification that the backup has
            started,
      <em class="replaceable">
       <code>
        backup_id
       </code>
      </em>
      is the unique
            identifier for this particular backup, and
      <em class="replaceable">
       <code>
        node_id
       </code>
      </em>
      is the node ID of the
            management server that is coordinating the backup with the
            data nodes. This output is accompanied by additional
            information including relevant global checkpoints, the
            number of records backed up, and the size of the data, as
            shown here:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-ndbmgm"><div class="docs-select-all right" id="sa74781969"><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 selector">Node 2:</span> Backup 1 started from node 1 completed
 StartGCP<span class="token operator">:</span> 177 StopGCP<span class="token operator">:</span> 180
 #Records<span class="token operator">:</span> 7362 #LogRecords<span class="token operator">:</span> 0
 Data<span class="token operator">:</span> 453648 bytes Log<span class="token operator">:</span> 0 bytes</code></pre>
     </div>
    </li>
   </ol>
  </div>
  <p>
   It is also possible to perform a backup from the system shell by
        invoking
   <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>
   with the
   <code class="option">
    -e
   </code>
   or
   <a class="link" href="mysql-cluster-programs-ndb-mgm.html#option_ndb_mgm_execute">
    <code class="option">
     --execute
    </code>
   </a>
   option, as shown in
        this example:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa16553837"><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-terminal"><span class="token prompt">$&gt; </span><span class="token command">ndb_mgm</span> <span class="token property">-e</span> <span class="token atrule">"START BACKUP 6 WAIT COMPLETED SNAPSHOTSTART"</span></code></pre>
  </div>
  <p>
   When using
   <code class="literal">
    START BACKUP
   </code>
   in this way, you must
        specify the backup ID.
  </p>
  <p>
   Cluster backups are created by default in the
   <code class="filename">
    BACKUP
   </code>
   subdirectory of the
   <a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-datadir">
    <code class="literal">
     DataDir
    </code>
   </a>
   on each data
        node. This can be overridden for one or more data nodes
        individually, or for all cluster data nodes in the
   <code class="filename">
    config.ini
   </code>
   file using the
   <a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-backupdatadir">
    <code class="literal">
     BackupDataDir
    </code>
   </a>
   configuration parameter. The backup files created for a backup
        with a given
   <em class="replaceable">
    <code>
     backup_id
    </code>
   </em>
   are stored in
        a subdirectory named
   <code class="filename">
    BACKUP-
    <em class="replaceable">
     <code>
      backup_id
     </code>
    </em>
   </code>
   in the backup directory.
  </p>
  <p>
   <a name="ndbclient-abort-backup">
   </a>
   <b>
    Cancelling backups.
   </b>
   To cancel or abort a backup that is already in progress,
          perform the following steps:
  </p>
  <div class="orderedlist">
   <ol class="orderedlist" type="1">
    <li class="listitem">
     <p>
      Start the management client.
     </p>
    </li>
    <li class="listitem">
     <p>
      Execute this command:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-ndbmgm"><div class="docs-select-all right" id="sa34595857"><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">ABORT BACKUP</span> <em class="replaceable">backup_id</em></code></pre>
     </div>
     <p>
      The number
      <em class="replaceable">
       <code>
        backup_id
       </code>
      </em>
      is the
            identifier of the backup that was included in the response
            of the management client when the backup was started (in the
            message
      <code class="literal">
       Backup
       <em class="replaceable">
        <code>
         backup_id
        </code>
       </em>
       started from node
       <em class="replaceable">
        <code>
         management_node_id
        </code>
       </em>
      </code>
      ).
     </p>
    </li>
    <li class="listitem">
     <p>
      The management client acknowledges the abort request with
      <code class="literal">
       Abort of backup
       <em class="replaceable">
        <code>
         backup_id
        </code>
       </em>
       ordered
      </code>
      .
     </p>
     <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
      <div class="admon-title">
       Note
      </div>
      <p>
       At this point, the management client has not yet received
              a response from the cluster data nodes to this request,
              and the backup has not yet actually been aborted.
      </p>
     </div>
    </li>
    <li class="listitem">
     <p>
      After the backup has been aborted, the management client
            reports this fact in a manner similar to what is shown here:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-ndbmgm"><div class="docs-select-all right" id="sa11844974"><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 selector">Node 1:</span> Backup 3 started from 5 has been aborted<span class="token punctuation">.</span>
  Error<span class="token operator">:</span> 1321 <span class="token operator">-</span> Backup aborted by user request<span class="token operator">:</span> Permanent error<span class="token operator">:</span> User defined error
<span class="token selector">Node 3:</span> Backup 3 started from 5 has been aborted<span class="token punctuation">.</span>
  Error<span class="token operator">:</span> 1323 <span class="token operator">-</span> 1323<span class="token operator">:</span> Permanent error<span class="token operator">:</span> Internal error
<span class="token selector">Node 2:</span> Backup 3 started from 5 has been aborted<span class="token punctuation">.</span>
  Error<span class="token operator">:</span> 1323 <span class="token operator">-</span> 1323<span class="token operator">:</span> Permanent error<span class="token operator">:</span> Internal error
<span class="token selector">Node 4:</span> Backup 3 started from 5 has been aborted<span class="token punctuation">.</span>
  Error<span class="token operator">:</span> 1323 <span class="token operator">-</span> 1323<span class="token operator">:</span> Permanent error<span class="token operator">:</span> Internal error</code></pre>
     </div>
     <p>
      In this example, we have shown sample output for a cluster
            with 4 data nodes, where the sequence number of the backup
            to be aborted is
      <code class="literal">
       3
      </code>
      , and the management
            node to which the cluster management client is connected has
            the node ID
      <code class="literal">
       5
      </code>
      . The first node to complete
            its part in aborting the backup reports that the reason for
            the abort was due to a request by the user. (The remaining
            nodes report that the backup was aborted due to an
            unspecified internal error.)
     </p>
     <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
      <div class="admon-title">
       Note
      </div>
      <p>
       There is no guarantee that the cluster nodes respond to an
       <code class="literal">
        ABORT BACKUP
       </code>
       command in any particular
              order.
      </p>
     </div>
     <p>
      The
      <code class="literal">
       Backup
       <em class="replaceable">
        <code>
         backup_id
        </code>
       </em>
       started from node
       <em class="replaceable">
        <code>
         management_node_id
        </code>
       </em>
       has been
            aborted
      </code>
      messages mean that the backup has been
            terminated and that all files relating to this backup have
            been removed from the cluster file system.
     </p>
    </li>
   </ol>
  </div>
  <p>
   It is also possible to abort a backup in progress from a system
        shell using this command:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa96417901"><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-terminal"><span class="token prompt">$&gt; </span><span class="token command">ndb_mgm</span> <span class="token property">-e</span> <span class="token atrule">"ABORT BACKUP <em class="replaceable">backup_id</em>"</span></code></pre>
  </div>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Note
   </div>
   <p>
    If there is no backup having the ID
    <em class="replaceable">
     <code>
      backup_id
     </code>
    </em>
    running when an
    <code class="literal">
     ABORT BACKUP
    </code>
    is issued, the management
          client makes no response, nor is it indicated in the cluster
          log that an invalid abort command was sent.
   </p>
  </div>
 </div>
 <br/>
</div>
