O'Reilly logo

Hadoop 2.x Administration Cookbook by Gurmukh Singh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

HBase backup and restore

In this recipe, we will look at HBase backup and restore. We have discussed in the Namenode high availability section about the importance of backup, despite having HA. We will look at ways to take snapshots and restore it.

Getting ready

For this recipe, you must have completed the Setting up multi-node Hbase cluster recipe and have a basic understanding of the backup principles.

How to do it...

  1. Connect to the master1.cyrus.com HBase master node and switch to the user hadoop.
  2. Execute the following command to take a snapshot of a particular table. In this case, the table name is test:
    $ hbase snapshot create -n test_30march -t test
    
  3. To list the snapshots, connect the HBase shell as shown in the following screenshot:
  4. We can restore ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required