What is a Snapshot?
A snapshot is a set of metadata information that allows an admin to get back to a previous state of the table. A snapshot is not a copy of the table; it’s just a list of file names and doesn’t copy the data. A full snapshot restore means that you get back to the previous “table schema” and you get back your previous data losing any changes made since the snapshot was taken.
1.Taking a snapshot
hbase(main):013:0> snapshot ‘kafka_offset’, ‘kafka_offset.snapshot’
0 row(s) in 0.3850 seconds
2.List snap shots
SNAPSHOT TABLE + CREATION TIME
kafka_offset.snapshot kafka_offset (Mon Mar 12 14:37:47 +0100 2018)
1 row(s) in 0.0160 seconds
hbase(main):016:0> delete_snapshot ‘kafka_offset.snapshot’
0 row(s) in 0.0260 seconds
4. Restore snapshot
hbase(main):016:0> restore_snapshot ‘kafka_offset.snapshot’
5.To export an existing snapshot to another cluster, use the ExportSnapshot tool.
hbase org.apache.hadoop.hbase.snapshot.ExportSnapshot -snapshot
SnapshotName -copy-to hdfs:///srv2:8082/hbase