28787
DISCUSSIONS
102102
MEMBERS
3161
ARTICLES
hi,
I try to have a backup of a HBASE tale to another cluster. I can't use replication because we only make bulkload to populate the table. I try the snapshot. It work great if i try to restore my table locally but it make nothing if i want to restore on another cluster.
On the master, i create a table with some lines on table HADOOLAP_PRD, i make a snapshot and copy it to the slave:
[hdfs@master ~]$ hbase shell
15/08/12 11:18:41 INFO Configuration.deprecation: hadoop.native.lib is deprecated. Instead, use io.native.lib.available
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.98.6-cdh5.3.0, rUnknown, Tue Dec 16 19:13:29 PST 2014
hbase(main):001:0> count 'HADOOLAP_PRD'
74 row(s) in 0.2440 seconds
=> 74
hbase(main):002:0> snapshot 'HADOOLAP_PRD', 'test'
0 row(s) in 0.4260 seconds
hbase(main):003:0> exit
[hdfs@master ~]$/usr/bin/hbase org.apache.hadoop.hbase.snapshot.ExportSnapshot -snapshot test -copy-to hdfs://slave:8020/hbase -chuser hbase -chgroup hbase
....
org.apache.hadoop.hbase.snapshot.ExportSnapshot$Counter
BYTES_COPIED=3676
BYTES_EXPECTED=3676
FILES_COPIED=1
File Input Format Counters
Bytes Read=0
File Output Format Counters
Bytes Written=0
15/08/12 11:28:46 INFO snapshot.ExportSnapshot: Finalize the Snapshot Export
15/08/12 11:28:46 INFO snapshot.ExportSnapshot: Verify snapshot integrity
15/08/12 11:28:46 INFO Configuration.deprecation: fs.default.name is deprecated. Instead, use fs.defaultFS
15/08/12 11:28:46 INFO snapshot.ExportSnapshot: Export Completed: test
On the slave, i restore my snapshot but the table is empty:
[hdfs@slave ~]# hbase shell
15/08/12 11:29:26 INFO Configuration.deprecation: hadoop.native.lib is deprecated. Instead, use io.native.lib.available
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.98.6-cdh5.3.0, rUnknown, Tue Dec 16 19:13:29 PST 2014
hbase(main):001:0> disable 'HADOOLAP_PRD'
0 row(s) in 3.3470 seconds
hbase(main):002:0> restore_snapshot 'test'
0 row(s) in 0.8830 seconds
hbase(main):003:0> enable 'HADOOLAP_PRD'
0 row(s) in 0.2710 seconds
hbase(main):004:0> count 'HADOOLAP_PRD'
0 row(s) in 0.1290 seconds
=> 0
What i have doing wrong?
Stephane