<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: HBase backup - offline, standalone mode (no HDFS) in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-backup-offline-standalone-mode-no-HDFS/m-p/103935#M29908</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/7634/jasonknaster.html" nodeid="7634"&gt;@Jason Knaster&lt;/A&gt;&lt;P&gt;I just tested this scenario on Hbase 1.1.2 and it worked.&lt;/P&gt;&lt;P&gt;[root@ey ~]# cat /usr/hdp/current/hbase-master/conf/hbase-site.xml&lt;/P&gt;&lt;PRE&gt;&amp;lt;configuration&amp;gt;
  &amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;hbase.rootdir&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;file:///test/hbase&amp;lt;/value&amp;gt;
  &amp;lt;/property&amp;gt;
  &amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;hbase.zookeeper.property.dataDir&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;/test/zookeeper&amp;lt;/value&amp;gt;
  &amp;lt;/property&amp;gt;
&amp;lt;/configuration&amp;gt;&lt;/PRE&gt;&lt;PRE&gt;root@ey hbase-master]# ./bin/start-hbase.sh
[root@ey hbase-master]# hbase shell

hbase(main):001:0&amp;gt; create 't1','c1'
0 row(s) in 1.4790 seconds
=&amp;gt; Hbase::Table - t1
hbase(main):002:0&amp;gt; put 't1','123','c1:id','123m'
0 row(s) in 0.1500 seconds
hbase(main):003:0&amp;gt; scan 't1'
ROW                                                  COLUMN+CELL
 123                                                 column=c1:id, timestamp=1464183553280, value=123m
1 row(s) in 0.0340 seconds

Then Stopped the standlone Hbase .

Compressed and transfer the hbase dir to another node.

[root@ey hbase-master]# tar -cvf  test.tar /test
[root@ey ~]# scp test.tar root@AD:/root/

On Node "AD"

[root@AD ~]# tar xvf test.tar
[root@AD ~]# mv /root/test /

Copied same hbase-site.xml from primary hbase.

[root@AD hbase-master]# ./bin/start-hbase.sh

root@AD hbase-master]# hbase shell
hbase(main):001:0&amp;gt; list
TABLE
t1
1 row(s) in 0.2860 seconds
=&amp;gt; ["t1"]
hbase(main):002:0&amp;gt; scan 't1'
ROW                                                  COLUMN+CELL
 123                                                 column=c1:id, timestamp=1464183553280, value=123m
1 row(s) in 0.1290 seconds
hbase(main):003:0&amp;gt;
&lt;/PRE&gt;</description>
    <pubDate>Fri, 27 May 2016 07:43:04 GMT</pubDate>
    <dc:creator>jyadav</dc:creator>
    <dc:date>2016-05-27T07:43:04Z</dc:date>
    <item>
      <title>HBase backup - offline, standalone mode (no HDFS)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-backup-offline-standalone-mode-no-HDFS/m-p/103928#M29901</link>
      <description>&lt;P&gt;We are looking for the best way to backup/restore our HBase (Phoenix) databases in some of our development environments. These environments are running a standalone install of HBase, so no HDFS, writes go to the filesystem.&lt;/P&gt;&lt;P&gt;I have looked through &lt;A href="https://community.hortonworks.com/questions/6584/hbase-table-dump-to-flat-files.html" target="_blank"&gt;https://community.hortonworks.com/questions/6584/hbase-table-dump-to-flat-files.html&lt;/A&gt; and other documents, and most comments refer to HDFS commands, which obviously don't apply in this case.&lt;/P&gt;&lt;P&gt;Can we just zip up the data directory? What about the metadata? We want to be able to "export" the database, and restore it to another environment (or over the existing one) at some point in the future. Having a portable artifact like a RDBMS backup would be ideal.&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 04:20:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-backup-offline-standalone-mode-no-HDFS/m-p/103928#M29901</guid>
      <dc:creator>jason_knaster</dc:creator>
      <dc:date>2016-05-27T04:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: HBase backup - offline, standalone mode (no HDFS)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-backup-offline-standalone-mode-no-HDFS/m-p/103929#M29902</link>
      <description>&lt;P&gt;In our case, it is acceptable for HBase to be stopped before the "backup", so we can be sure to be consistent.&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 04:26:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-backup-offline-standalone-mode-no-HDFS/m-p/103929#M29902</guid>
      <dc:creator>jason_knaster</dc:creator>
      <dc:date>2016-05-27T04:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: HBase backup - offline, standalone mode (no HDFS)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-backup-offline-standalone-mode-no-HDFS/m-p/103930#M29903</link>
      <description>&lt;P&gt;For database backup / restore, Please take a look at HBASE-7912&lt;/P&gt;&lt;P&gt;The git branch is HBASE-7912&lt;/P&gt;&lt;P&gt;FYI&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 05:23:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-backup-offline-standalone-mode-no-HDFS/m-p/103930#M29903</guid>
      <dc:creator>tyu</dc:creator>
      <dc:date>2016-05-27T05:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: HBase backup - offline, standalone mode (no HDFS)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-backup-offline-standalone-mode-no-HDFS/m-p/103931#M29904</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/7634/jasonknaster.html" nodeid="7634"&gt;@Jason Knaster&lt;/A&gt; I don't think we have any direct method available with current HDP release. Please see HBASE-7912 as Ted mentioned.&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 06:35:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-backup-offline-standalone-mode-no-HDFS/m-p/103931#M29904</guid>
      <dc:creator>jyadav</dc:creator>
      <dc:date>2016-05-27T06:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: HBase backup - offline, standalone mode (no HDFS)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-backup-offline-standalone-mode-no-HDFS/m-p/103932#M29905</link>
      <description>&lt;P&gt;Just stop HBase and copy the contents of your hbase.rootdir directory (in hdfs version it is /apps/hbase/data, in your case it's somewhere on your file system). That's going to be your backup artifact. Then, as a test try to restore it to another environment and make sure it works by listing and scanning some tables. All HBase metadata are included there, and it should work as-is.&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 06:56:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-backup-offline-standalone-mode-no-HDFS/m-p/103932#M29905</guid>
      <dc:creator>pminovic</dc:creator>
      <dc:date>2016-05-27T06:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: HBase backup - offline, standalone mode (no HDFS)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-backup-offline-standalone-mode-no-HDFS/m-p/103933#M29906</link>
      <description>&lt;P&gt;Thanks, I will test that out in the next day or two - I think this is what I was looking for (confirmation that all the metadata I need will be in the data directory). &lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 06:57:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-backup-offline-standalone-mode-no-HDFS/m-p/103933#M29906</guid>
      <dc:creator>jason_knaster</dc:creator>
      <dc:date>2016-05-27T06:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: HBase backup - offline, standalone mode (no HDFS)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-backup-offline-standalone-mode-no-HDFS/m-p/103934#M29907</link>
      <description>&lt;P&gt;Yes, metadata is in stored in special HBase tables in the 'hbase' namespace. In latest versions of HBase you can inspect them by opening hbase shell and running, for example&lt;/P&gt;&lt;PRE&gt;list_namespace_tables 'hbase'
scan 'hbase:meta'&lt;/PRE&gt;&lt;P&gt;This approach won't work in distributed HBase, and some changes in "meta" would be required. Also in your case it might be necessary to restore the backup directory on the same path in the target system, but most likely not. Just give it a try.&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2016 07:34:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-backup-offline-standalone-mode-no-HDFS/m-p/103934#M29907</guid>
      <dc:creator>pminovic</dc:creator>
      <dc:date>2016-05-27T07:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: HBase backup - offline, standalone mode (no HDFS)</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-backup-offline-standalone-mode-no-HDFS/m-p/103935#M29908</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/7634/jasonknaster.html" nodeid="7634"&gt;@Jason Knaster&lt;/A&gt;&lt;P&gt;I just tested this scenario on Hbase 1.1.2 and it worked.&lt;/P&gt;&lt;P&gt;[root@ey ~]# cat /usr/hdp/current/hbase-master/conf/hbase-site.xml&lt;/P&gt;&lt;PRE&gt;&amp;lt;configuration&amp;gt;
  &amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;hbase.rootdir&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;file:///test/hbase&amp;lt;/value&amp;gt;
  &amp;lt;/property&amp;gt;
  &amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;hbase.zookeeper.property.dataDir&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;/test/zookeeper&amp;lt;/value&amp;gt;
  &amp;lt;/property&amp;gt;
&amp;lt;/configuration&amp;gt;&lt;/PRE&gt;&lt;PRE&gt;root@ey hbase-master]# ./bin/start-hbase.sh
[root@ey hbase-master]# hbase shell

hbase(main):001:0&amp;gt; create 't1','c1'
0 row(s) in 1.4790 seconds
=&amp;gt; Hbase::Table - t1
hbase(main):002:0&amp;gt; put 't1','123','c1:id','123m'
0 row(s) in 0.1500 seconds
hbase(main):003:0&amp;gt; scan 't1'
ROW                                                  COLUMN+CELL
 123                                                 column=c1:id, timestamp=1464183553280, value=123m
1 row(s) in 0.0340 seconds

Then Stopped the standlone Hbase .

Compressed and transfer the hbase dir to another node.

[root@ey hbase-master]# tar -cvf  test.tar /test
[root@ey ~]# scp test.tar root@AD:/root/

On Node "AD"

[root@AD ~]# tar xvf test.tar
[root@AD ~]# mv /root/test /

Copied same hbase-site.xml from primary hbase.

[root@AD hbase-master]# ./bin/start-hbase.sh

root@AD hbase-master]# hbase shell
hbase(main):001:0&amp;gt; list
TABLE
t1
1 row(s) in 0.2860 seconds
=&amp;gt; ["t1"]
hbase(main):002:0&amp;gt; scan 't1'
ROW                                                  COLUMN+CELL
 123                                                 column=c1:id, timestamp=1464183553280, value=123m
1 row(s) in 0.1290 seconds
hbase(main):003:0&amp;gt;
&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 May 2016 07:43:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBase-backup-offline-standalone-mode-no-HDFS/m-p/103935#M29908</guid>
      <dc:creator>jyadav</dc:creator>
      <dc:date>2016-05-27T07:43:04Z</dc:date>
    </item>
  </channel>
</rss>

