- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
HBase data migration from one cluster to other cluster
- Labels:
-
Apache HBase
Created 09-27-2018 07:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Need help with HBase data migration from one cluster to other cluster. Please share the instructions or any proper articles.
Thanks.
Created 09-29-2018 06:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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"
Created 09-29-2018 06:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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"
Created 10-26-2018 09:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Created 06-20-2020 12:09 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which user do you need to be to execute these commands? I'm getting PermissionDenied Error. Please advise.
TIA
Created 06-21-2020 11:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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.
Regards,
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:
Created 09-29-2018 07:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please follow below link :
