Support Questions
Find answers, ask questions, and share your expertise

How to import snapshot under Hadoop Directory into Hbase Shell

Listed below are the steps taken for copying a table from one host onto another.

1. We took a snapshot of our table on a single node machine.

2. Move snapshot from HBase Shell to Hadoop Directory.

3. CopyToLocal Directory from Hadoop Directoy to Secure copy onto another host on a different subnet.

4. CopyFromLocal Directory to Hadoop Directory.

We are now on the last step which is to bring the snapshot folder back into HBase and restore it in HBase Shell.

Any suggestions or insight would be greatly appreciated!



Hi, there's a documentation for export hbase table snapshot to another cluster:

If this doesn't meet your scenario (like the two clusters cannot connect with each other), I suggest just copyToLocal the /hbase/data/default/<table_name> directory and copyFromLocal to another cluster's hdfs(using the same directory path), and finally use 'hbase hbck -repair' to complete the migration.

To restore, you need to copy the exported files into the destination HBase installation directory.

hdfs dfs -cp /<export_dir>/.hbase-snapshot/<snapshot_name> ${hbase.rootdir}/.hbase-snapshot/


hdfs dfs -mkdir -p ${hbase.rootdir}/archive/data/default


hdfs dfs -cp /<export_dir>/archive/data/default/<TABLE_NAME> ${hbase.rootdir}/archive/data/default/

After this, you should be able to see your snapshot in the hbase shell via `list_snapshots` and then use `clone_snapshot` create a table from that snapshot.

New Contributor

Is it possible to directly storing the output of ExportSnapshot to ${hbase.rootdir}/ path instead of copying again?