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

# CANCEL RESTORE

> Cancels an ongoing RESTORE task in a specified database.

Cancels an ongoing RESTORE task in a specified database.

> **CAUTION**
>
> If a RESTORE task is canceled during the COMMIT phase, the restored data will be corrupted and inaccessible. In this case, you can only perform the RESTORE operation again and wait for the job to complete.

## Syntax

```SQL theme={null}
CANCEL RESTORE { FROM <db_name> | FOR EXTERNAL CATALOG }
```

## Parameters

| **Parameter** | **Description** |
| - | - |
| db\_name | Name of the database that the RESTORE task belongs to. |
| FOR EXTERNAL CATALOG | Cancels the ongoing RESTORE task for the external catalog metadata. |

## Examples

Example 1: Cancels the RESTORE task under the database `example_db`.

```SQL theme={null}
CANCEL RESTORE FROM example_db;
```


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