delete_table_snapshots

Definition

Deletes snapshots of the specified table. Allows to use regular expressions for defining a table name and — optionally — a snapshot name.

Usage

delete_table_snapshots '<table_regex>'[, '<snapshot_regex>']
Arguments
Parameter Description

table_regex

A regular expression for searching tables

snapshot_regex

A regular expression for searching snapshots

Examples

Without using regular expressions

hbase(main):053:0> delete_table_snapshots 'temp1'
SNAPSHOT              TABLE + CREATION TIME
 snap1                temp1 (2021-11-24 06:31:27 UTC)

Delete the above 1 snapshots (y/n)?
y
Successfully deleted snapshot: snap1

Took 0.0207 seconds
=> [#<Java::OrgApacheHadoopHbaseClient::SnapshotDescription:0x3578a45b>]

Using regular expressions

hbase(main):054:0> delete_table_snapshots '.*', 'snap.*'
SNAPSHOT              TABLE + CREATION TIME
No snapshots matched the table name regular expression .* and the snapshot name regular expression snap.*
Took 0.0066 seconds
Found a mistake? Seleсt text and press Ctrl+Enter to report it