- The snapshot cannot be dropped while a BACKUP job is writing it or a RESTORE job is reading it.
- The snapshot cannot be dropped if its repository is read-only.
Privilege requirement
Users must have the REPOSITORY privilege at the System level.Syntax
Parameters
Snapshot ownership
Each snapshot records the ID of the cluster that created it. WithoutFORCE, the database deletes the snapshot only when that ID matches the current cluster, which you can read from the ClusterId column of SHOW SNAPSHOT and the ClusterId column of SHOW FRONTENDS.
The statement is rejected when the snapshot:
- was created by another cluster sharing the same repository,
- was created before v4.2.0 and therefore records no cluster ID, or
- has no readable snapshot metadata, which is the case while a backup is still running and after a backup was interrupted.
FORCE to delete such a snapshot anyway. Deleting a snapshot that this cluster did not create removes data that another cluster may still depend on, so confirm that the data is yours to remove before using it.
Examples
Example 1: Deletes the snapshotbackup1 from repository example_repo.
legacy_backup from repository example_repo even though it was not created by this cluster.