> ## 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.

# /alter/backup

```
URL: http://<db.host>:<db.port>/alter/backup
```

Alters an existing database
[backup](../../admin/backup_restore/#database-backup), accessible via the
[data sink](../../concepts/data_sinks/) specified by input parameter
*datasink\_name*.

## Input Parameter Description

<ParamField body="backup_name" type="string">
  Name of the backup to be altered.
</ParamField>

<ParamField body="action" type="string">
  Operation to be applied.

  * **checksum**: Calculate checksum for backed-up files.
  * **ddl\_only**: Whether or not to only save DDL and not back up table data, when taking future snapshots; set input parameter *value* to 'true' or 'false' for DDL only or DDL and table data, respectively.
  * **max\_incremental\_backups\_to\_keep**: Maximum number of incremental snapshots to keep, when taking future snapshots; set input parameter *value* to the number of snapshots to keep.
  * **merge**: Merges all snapshots within a backup and creates a single full snapshot.
  * **purge**: Deletes a snapshot from a backup; set input parameter *value* to the snapshot ID to purge.
</ParamField>

<ParamField body="value" type="string">
  Value of the modification, depending on input parameter *action*.
</ParamField>

<ParamField body="datasink_name" type="string">
  Data sink through which the backup is accessible.
</ParamField>

<ParamField body="options" type="map of string to strings">
  Optional parameters.

  The default value is an empty map ( \{} ).

  <Expandable title="options">
    <ParamField body="comment">
      Comments to store with the backup.
    </ParamField>

    <ParamField body="dry_run">
      Whether or not to perform a dry run of a backup alteration.

      The default value is `false`.

      The supported values are:

      * true
      * false
    </ParamField>
  </Expandable>
</ParamField>

## Output Parameter Description

The Kinetica server embeds the endpoint response inside a standard response structure which contains status information and the actual response to the query.  Here is a description of the various fields of the wrapper:

<ResponseField name="status" type="String">
  'OK' or 'ERROR'
</ResponseField>

<ResponseField name="message" type="String">
  Empty if success or an error message
</ResponseField>

<ResponseField name="data_type" type="String">
  'alter\_backup\_response' or 'none' in case of an error
</ResponseField>

<ResponseField name="data" type="String">
  Empty string
</ResponseField>

<ResponseField name="data_str" type="JSON or String">
  This embedded JSON represents the result of the /alter/backup endpoint:

  <Expandable title="data_str">
    <ResponseField name="backup_name" type="string">
      Value of input parameter *backup\_name*.
    </ResponseField>

    <ResponseField name="backup_id" type="long">
      ID of the snapshot affected by the alter operation, if any.
    </ResponseField>

    <ResponseField name="total_bytes" type="long">
      Total size of files affected by the alter operation.
    </ResponseField>

    <ResponseField name="total_number_of_records" type="long">
      Total number of records affected by the alter operation.
    </ResponseField>

    <ResponseField name="info" type="map of string to strings">
      Additional information.
    </ResponseField>
  </Expandable>

  Empty string in case of an error.
</ResponseField>
