Using Apache HBase to store and access data
Also available as:
PDF
loading table of contents...

Restore a Snapshot

The restore operation brings back the table to its original state when the snapshot was taken, changing both data and schema, if required.

The restore operation requires the table to be disabled.
Note
Note

Because replication works at the log level and snapshots work at the file system level, after a restore, the replicas will be in a different state than the master. If you want to use restore, you need to stop replication and redo the bootstrap.

In case of partial data loss due to client issues, you can clone the table from the snapshot and use a MapReduce job to copy the data that you need from the clone to the main one (instead of performing a full restore, which requires the table to be disabled).

  • In the HBase shell, first disable the table.
  • Enterrestore_snapshot command and specify the name of the table.
    $ hbase shell
    hbase> disable 'myTable'
    hbase> restore_snapshot 'myTableSnapshot-122112'