Support Questions

Find answers, ask questions, and share your expertise

Hbase backup

avatar

I have one query. Is there any command to take backup off all table at a time or I have to take a backup of table one by one. If yes then please elaborate,

Thanks in advance for help.

1 ACCEPTED SOLUTION

avatar
Guru
6 REPLIES 6

avatar
Rising Star

Hi @Ashnee Sharma, I don't think there is a simple command to backup all tables at a time. To backup the whole hbase cluster, you need to shutdown it first and use distcp tool to backup all hbase data on HDFS.

To backup single table, you could use Replication, CopyTable or Export. You can find the details here: http://hbase.apache.org/book.html#ops.backup

My suggestion is that you can write a small script to backup all the tables one by one in a live cluster.

avatar

Ok thanks, I have single node cluster and I want to reformat the cluster thats why I am looking for sigle command which will help me to take a backup of all hbase table at a time.

avatar
Master Collaborator

@Ashnee:

You can also use snapshot for table backup:

http://hbase.apache.org/book.html#ops.snapshots

avatar

Yes snapshot is one of the option.

avatar
Guru

The best summary of the backup status and what is coming in HDP-2.5 is here:

https://hortonworks.com/blog/coming-hdp-2-5-incremental-backup-restore-apache-hbase-apache-phoenix/