6. Restore a snapshot

The restore operation requires the table to be disabled. The table will be restored to the state at the time when the snapshot was taken (this operation might change both data and schema).

    $ C:\...\hbase..\bin\hbase.cmd shell
    hbase> disable 'myTable'
    hbase> restore_snapshot 'myTableSnapshot-122112'
        

[Note]Note

Replication works at log level and snapshots at file-system level. Therefore, after a restore operation, the replicas will have a state that is different from the master. If you want to perform the restore operation, you must stop replication and perform bootstrap operation again.

In case if you experience partial data-loss (due to client failure), instead of performing a full restore (full restore requires disabling the table), you can clone the table from the snapshot and use a Map-Reduce job to copy the data that you need from the cloned table to the main table.