Search code examples
hbase

HBase command for Viewing Snapshots


I have created a few snapshots of my hbase tables. Is there a way to see all the snapshots created in HBASE? Something like list snapshots?


Solution

  • There are few things to be done here as the document says:

    1) Turn on the snapshot support just set the " hbase.snapshot.enabled" to true

    <property>
    <name>hbase.snapshot.enabled</name>
    <value>true</value>
    

    2)Take the snapshot

    $ ./bin/hbase shell
    hbase> snapshot 'myTable', 'myTableSnapshot-122112'
    

    3) List all the snapshots taken:

    $ ./bin/hbase shell
    hbase> list_snapshots
    

    *There are other functionalities too just check out this : http://hbase.apache.org/0.94/book/ops.snapshots.html