Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

HBase data migration from one cluster to other cluster

Solved Go to solution
Highlighted

HBase data migration from one cluster to other cluster

Contributor

Hi, Need help with HBase data migration from one cluster to other cluster. Please share the instructions or any proper articles.

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: HBase data migration from one cluster to other cluster

Dhiraj

There are many method to achieve the same like copytable , import/export utility , snapshot . I would prefer snapshot method .But snapshot method will work if Hbase is of same version in both the cluster .If your both cluster hbase versions are different then you can use Copytable method.

snapshot method :

STEP 1: Go to hbase-shell and Take a snapshot of table

>hbase shell

>snapshot "SOURCE_TABLE_NAME","SNAPSHOT_TABLE_NAME"

Step 3 : Export that snapshot to other cluster

>bin/hbase org.apache.hadoop.hbase.snapshot.ExportSnapshot -snapshot SNAPSHOT_TABLE_NAME -copy-to hdfs://DESTINATION_CLUSTER_ACTIVE_NAMENODE_ADDRESS:8020/hbase -mappers 16

STEP 4: restore the table on DESTINATION Cluster :

>hbase shell

>disable "DEST_TABLENAME"

>restore_snapshot "SNAPSHOT_TABLE_NAME"

View solution in original post

5 REPLIES 5
Highlighted

Re: HBase data migration from one cluster to other cluster

Dhiraj

There are many method to achieve the same like copytable , import/export utility , snapshot . I would prefer snapshot method .But snapshot method will work if Hbase is of same version in both the cluster .If your both cluster hbase versions are different then you can use Copytable method.

snapshot method :

STEP 1: Go to hbase-shell and Take a snapshot of table

>hbase shell

>snapshot "SOURCE_TABLE_NAME","SNAPSHOT_TABLE_NAME"

Step 3 : Export that snapshot to other cluster

>bin/hbase org.apache.hadoop.hbase.snapshot.ExportSnapshot -snapshot SNAPSHOT_TABLE_NAME -copy-to hdfs://DESTINATION_CLUSTER_ACTIVE_NAMENODE_ADDRESS:8020/hbase -mappers 16

STEP 4: restore the table on DESTINATION Cluster :

>hbase shell

>disable "DEST_TABLENAME"

>restore_snapshot "SNAPSHOT_TABLE_NAME"

View solution in original post

Highlighted

Re: HBase data migration from one cluster to other cluster

Contributor
@Anurag Mishra

Thanks for the detailed steps, but will snapshot take cares of DDLs too? or do we need to take a DDL and create it manually in the destination cluster?

Thanks,

Dhiraj.

Highlighted

Re: HBase data migration from one cluster to other cluster

New Contributor

Which user do you need to be to execute these commands? I'm getting PermissionDenied Error. Please advise.

TIA

Highlighted

Re: HBase data migration from one cluster to other cluster

Community Manager

@trent_larson As this is an older post, you would have a better chance of receiving a resolution by starting a new thread. This will also provide the opportunity to provide details specific to your environment that could aid others in providing a more accurate answer to your question. 


Vidya Sargur, Community Manager

Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community:

Highlighted

Re: HBase data migration from one cluster to other cluster

Don't have an account?
Coming from Hortonworks? Activate your account here