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

# DROP BACKUP

Deletes one or more [backups](https://docs.kinetica.com/content/sql/backup_restore/create-backup.md#sql-backup-create) and all
associated files from the remote store accessible through the given
[data sink](https://docs.kinetica.com/content/sql/ddl/create-data-sink.md#sql-create-data-sink).

```sql title="DROP BACKUP Syntax" theme={null}
DROP BACKUP < <backup name> | "<backup name>*" | * >
DATA SINK <data sink name>
[WITH OPTIONS (<delete option name> = '<delete option value>'[,...])]
```

## Parameters

> [accordion] \<backup name>
>
> Name of the *backup(s)* to delete that are accessible via the *data sink* given by
> `data sink name`.
>
> Use `<backup name>*` to delete all *backups* that start with `backup name`.
>
> Use `*` instead of `<backup name>` to delete all *backups*.
>
> > [!NOTE]
> >
> > The `DELETE_ALL_BACKUPS` option must be set to `true` when using `*`.

> [accordion] \<data sink name>
>
> Name of the [data sink](https://docs.kinetica.com/content/sql/ddl/create-data-sink.md#sql-create-data-sink) to use to delete the database
> *backup* files from the remote file store.

> [accordion] WITH OPTIONS
>
> Optional indicator that a comma-delimited list of deletion option name/value assignments
> will follow.
>
> Delete options include:
>
> <table>
>   <thead>
>     <tr>
>       <th>Option</th>
>       <th>Description</th>
>     </tr>
>   </thead>
>
>   <tbody>
>     <tr>
>       <td>`DELETE_ALL_BACKUPS`</td>
>       <td>Whether or not to allow multiple *backups* to be deleted if `*` is used to specify more than one *backup*; default (`false`) is to prevent deleting multiple *backups*.</td>
>     </tr>
>
>     <tr>
>       <td>`DRY_RUN`</td>
>       <td>Whether or not to execute a dry run of a *backup* deletion and not actually delete the *backup* files; default (`false`) is to delete *backups*.</td>
>     </tr>
>
>     <tr>
>       <td>`NO_ERROR_IF_NOT_EXISTS`</td>
>       <td>Whether or not to suppress an error if the given *backup* does not exist; default (`false`) is to return an error.</td>
>     </tr>
>   </tbody>
> </table>

## Examples

For example, to delete a *backup*, `schema_backup`, via a
*data sink*, `backup_ds`, through which the *backup* files can be accessed:

```sql DROP BACKUP Example theme={null}
DROP BACKUP schema_backup
DATA SINK = backup_ds
```

To delete all *backups* accessible via the `backup_ds` *data sink* that have a
*backup* name starting with `conf`:

```sql DROP BACKUP (All Matching Backups at Data Sink) Example theme={null}
DROP BACKUP "conf*"
DATA SINK = backup_ds
WITH OPTIONS (DELETE_ALL_BACKUPS = true)
```

To delete all *backups* accessible via the `backup_ds` *data sink*:

```sql DROP BACKUP (All Backups at Data Sink) Example theme={null}
DROP BACKUP *
DATA SINK = backup_ds
WITH OPTIONS (DELETE_ALL_BACKUPS = true)
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.