> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# restoreBackup

<div className="kinetica-javadoc">
  <ul className="member-list">
    <li>
      <div className="section detail" id="restoreBackup(com.gpudb.protocol.RestoreBackupRequest)">
        <h3>restoreBackup</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/RestoreBackupResponse" title="class in com.gpudb.protocol">RestoreBackupResponse</a></span> <span className="element-name">restoreBackup</span><wbr /><span className="parameters">(<a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest" title="class in com.gpudb.protocol">RestoreBackupRequest</a> request)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>
        <div className="block">Restores database objects from a <a href="/content/admin/backup_restore/#database-backup" target="_top">backup</a> accessible via the <a href="/content/concepts/data_sources/" target="_top">data source</a> specified by <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest#getDatasourceName()"><code>datasourceName</code></a>.</div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>request</code> - <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest" title="class in com.gpudb.protocol"><code>Request</code></a> object containing the parameters for the operation.</div>
          <div className="dt">Returns:</div>
          <div className="dd"><a href="/content/api/java/com/gpudb/protocol/RestoreBackupResponse" title="class in com.gpudb.protocol"><code>Response</code></a> object containing the results of the operation.</div>
          <div className="dt">Throws:</div>
          <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - if an error occurs during the operation.</div>
        </div>
      </div>
    </li>

    <li>
      <div className="section detail" id="restoreBackup(java.lang.String,java.util.Map,java.lang.String,java.util.Map)">
        <h3>restoreBackup</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/RestoreBackupResponse" title="class in com.gpudb.protocol">RestoreBackupResponse</a></span> <span className="element-name">restoreBackup</span><wbr /><span className="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a> backupName, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link">Map</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>,<wbr /><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>> restoreObjectsMap, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a> datasourceName, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link">Map</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>,<wbr /><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>> options)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>
        <div className="block">Restores database objects from a <a href="/content/admin/backup_restore/#database-backup" target="_top">backup</a> accessible via the <a href="/content/concepts/data_sources/" target="_top">data source</a> specified by <code>datasourceName</code>.</div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>backupName</code> - Name of the backup to restore from, which must refer to an existing backup. The default value is ''.</div>

          <div className="dd">
            <code>restoreObjectsMap</code> - Map of database objects to be restored from the backup.

            <ul>
              <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.RestoreObjectsMap#ALL"><code>ALL</code></a>: All object types and data contained in the given <a href="/content/concepts/schemas/" target="_top">schema(s)</a>. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.RestoreObjectsMap#CATALOG"><code>CATALOG</code></a>: Data Lake catalog that is external to the database. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.RestoreObjectsMap#CONTEXT"><code>CONTEXT</code></a>: <a href="/content/sql-gpt/concepts/#sql-gpt-context" target="_top">Context(s)</a>. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.RestoreObjectsMap#CREDENTIAL"><code>CREDENTIAL</code></a>: <a href="/content/concepts/credentials/" target="_top">Credential(s)</a>. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.RestoreObjectsMap#DATASINK"><code>DATASINK</code></a>: <a href="/content/concepts/data_sinks/" target="_top">Data sink(s)</a>. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.RestoreObjectsMap#DATASOURCE"><code>DATASOURCE</code></a>: <a href="/content/concepts/data_sources/" target="_top">Data source(s)</a>. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.RestoreObjectsMap#DIRECTORY"><code>DIRECTORY</code></a>: KiFS <a href="/content/tools/kifs/" target="_top">File directory(ies)</a>. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.RestoreObjectsMap#FUNCTION_ENVIRONMENT"><code>FUNCTION\_ENVIRONMENT</code></a>: <a href="/content/udf/python/writing/#udf-python-func-env" target="_top">Python UDF function environment(s)</a>. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.RestoreObjectsMap#GRAPH"><code>GRAPH</code></a>: <a href="/content/graph_solver/network_graph_solver/" target="_top">Graph</a> definition(s). Source table(s), if applicable, are required in order to restore graph objects. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.RestoreObjectsMap#MONITOR"><code>MONITOR</code></a>: <a href="/content/concepts/table_monitors/" target="_top">Table monitor(s)</a> / <a href="/content/sql/ddl/create-stream" target="_top">SQL stream(s)</a>. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.RestoreObjectsMap#RESOURCE_GROUP"><code>RESOURCE\_GROUP</code></a>: <a href="/content/rm/concepts/#resource-groups" target="_top">Resource group(s)</a>. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.RestoreObjectsMap#ROLE"><code>ROLE</code></a>: <a href="/content/security/sec_concepts/#roles" target="_top">Role(s)</a>, role members (roles or users, recursively), and associated permissions. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.RestoreObjectsMap#STORED_PROCEDURE"><code>STORED\_PROCEDURE</code></a>: <a href="/content/sql/procedure/" target="_top">SQL procedure(s)</a>. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.RestoreObjectsMap#TABLE"><code>TABLE</code></a>: <a href="/content/concepts/tables/" target="_top">Table(s)</a> and <a href="/content/sql/ddl/create-view" target="_top">SQL view(s)</a>. Tables with subscriptions will by default be restored in the state they were in at the time of the snapshot. See <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#RESTORE_SUBSCRIPTIONS"><code>RESTORE\_SUBSCRIPTIONS</code></a> for options to override the default behavior. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.RestoreObjectsMap#USER"><code>USER</code></a>: <a href="/content/security/sec_concepts/#security-concepts-users" target="_top">User(s)</a> (internal and external) and associated permissions. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.RestoreObjectsMap#USER_DEFINED_FUNCTION"><code>USER\_DEFINED\_FUNCTION</code></a>: <a href="/content/udf_overview" target="_top">UDF(s)</a>. </li>
            </ul>
          </div>

          <div className="dd"><code>datasourceName</code> - Data source through which the backup will be restored.</div>

          <div className="dd">
            <code>options</code> - Optional parameters.

            <ul>
              <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#BACKUP_ID"><code>BACKUP\_ID</code></a>: ID of the snapshot to restore. Leave empty to restore the most recent snapshot in the backup. The default value is ''. </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#CHECKSUM"><code>CHECKSUM</code></a>: Whether or not to verify checksums for backup files when restoring. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#TRUE"><code>TRUE</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#FALSE"><code>FALSE</code></a> </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#FALSE"><code>FALSE</code></a>.
              </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#CREATE_SCHEMA_IF_NOT_EXIST"><code>CREATE\_SCHEMA\_IF\_NOT\_EXIST</code></a>: Behavior to apply when the schema containing any database object to restore does not already exist. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#TRUE"><code>TRUE</code></a>: If the schema containing any restored object does not exist, create it automatically. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#FALSE"><code>FALSE</code></a>: If the schema containing any restored object does not exist, return an error. </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#TRUE"><code>TRUE</code></a>.
              </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#DDL_ONLY"><code>DDL\_ONLY</code></a>: Behavior to apply when restoring tables. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#TRUE"><code>TRUE</code></a>: Restore table DDL, but do not restore data. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#FALSE"><code>FALSE</code></a>: Restore tables and their data. </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#FALSE"><code>FALSE</code></a>.
              </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#DRY_RUN"><code>DRY\_RUN</code></a>: Whether or not to perform a dry run of the restoration operation. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#TRUE"><code>TRUE</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#FALSE"><code>FALSE</code></a> </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#FALSE"><code>FALSE</code></a>.
              </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#RESTORE_SUBSCRIPTIONS"><code>RESTORE\_SUBSCRIPTIONS</code></a>: Behavior to apply when restoring datasource subscriptions on tables. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#RESUME"><code>RESUME</code></a>: Resume subscriptions that were active when the backup was made. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#PAUSE"><code>PAUSE</code></a>: Pause subscriptions that were active when the backup was made. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#CANCEL"><code>CANCEL</code></a>: Cancel active subscriptions. </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#RESUME"><code>RESUME</code></a>.
              </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#REINGEST"><code>REINGEST</code></a>: Behavior to apply when restoring table data. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#TRUE"><code>TRUE</code></a>: Restore table data by re-ingesting it. This is the default behavior if the cluster topology differs from that of the contained backup. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#FALSE"><code>FALSE</code></a>: Restore the persisted data files directly. </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#FALSE"><code>FALSE</code></a>.
              </li>

              <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#RENAMED_OBJECTS_SCHEMA"><code>RENAMED\_OBJECTS\_SCHEMA</code></a>: If the <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#RESTORE_POLICY"><code>RESTORE\_POLICY</code></a> is <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#RENAME"><code>RENAME</code></a>, use this schema for relocated existing objects instead of the default generated one. The default value is ''. </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#RESTORE_ALL_PERMISSIONS"><code>RESTORE\_ALL\_PERMISSIONS</code></a>: Whether or not all permissions of restored principals should be restored or scoped to the restored objects. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#TRUE"><code>TRUE</code></a>: Restore all permissions. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#FALSE"><code>FALSE</code></a>: Restore only permissions on restored objects. </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#FALSE"><code>FALSE</code></a>.
              </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#RESTORE_POLICY"><code>RESTORE\_POLICY</code></a>: Behavior to apply when any database object to restore already exists. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#NONE"><code>NONE</code></a>: If an object to be restored already exists with the same name, abort and return error. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#REPLACE"><code>REPLACE</code></a>: If an object to be restored already exists with the same name, replace it with the backup version. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#RENAME"><code>RENAME</code></a>: If an object to be restored already exists with the same name, move that existing one to the schema specified by <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#RENAMED_OBJECTS_SCHEMA"><code>RENAMED\_OBJECTS\_SCHEMA</code></a>. This policy does not apply to non-schema objects. </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#NONE"><code>NONE</code></a>.
              </li>

              <li><a href="/content/api/java/com/gpudb/protocol/RestoreBackupRequest.Options#TARGET_SCHEMA_MAP"><code>TARGET\_SCHEMA\_MAP</code></a>: Restore schema-based objects to alternate schema. Value is a comma delimitted list of key:value pairs mapping the original (source) schema name as it exists in the backup to a target (destination) schema namespace: "src: dst \[, src: dst \[, ...]]". Note that schema names are case sensitive and must adhere to the database schema <a href="/content/concepts/schemas/" target="_top">naming criteria</a>. The default value is ''. </li>
            </ul>

            The default value is an empty <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link"><code>Map</code></a>.
          </div>

          <div className="dt">Returns:</div>
          <div className="dd"><a href="/content/api/java/com/gpudb/protocol/RestoreBackupResponse" title="class in com.gpudb.protocol"><code>Response</code></a> object containing the results of the operation.</div>
          <div className="dt">Throws:</div>
          <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - if an error occurs during the operation.</div>
        </div>
      </div>
    </li>
  </ul>
</div>
