Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Fail to create hbase full backup

Fail to create hbase full backup

Rising Star

Hi,

  • Trying to create a full hbase backup using the following command (Hello World Tutorial series, LAB 4):

hbase@vds001:~$ hbase backup create full hdfs://MACHINE_NAME:8020/user/hbase/backup

  • I get the following error:

2017-02-10 15:22:16,146 INFO [main] util.BackupClientUtil: Using existing backup root dir: hdfs://vds001.databridge.tn:8020/user/hbase/backup Backup session finished. Status: FAILURE 2017-02-10 15:22:17,093 ERROR [main] util.AbstractHBaseTool: Error running command-line tool org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException): Failed 1 action: Table 'hbase:backup' was not found, got: driver_dangerous_event.: 1 time, at org.apache.hadoop.hbase.client.AsyncProcess$BatchErrors.makeException(AsyncProcess.java:234) at org.apache.hadoop.hbase.client.AsyncProcess$BatchErrors.access$1700(AsyncProcess.java:214) at org.apache.hadoop.hbase.client.AsyncProcess.waitForAllPreviousOpsAndReset(AsyncProcess.java:1751) at org.apache.hadoop.hbase.client.BufferedMutatorImpl.backgroundFlushCommits(BufferedMutatorImpl.java:208) at org.apache.hadoop.hbase.client.BufferedMutatorImpl.flush(BufferedMutatorImpl.java:183) at org.apache.hadoop.hbase.client.HTable.flushCommits(HTable.java:1422) at org.apache.hadoop.hbase.client.HTable.put(HTable.java:1013) at org.apache.hadoop.hbase.backup.impl.BackupSystemTable.updateBackupInfo(BackupSystemTable.java:127) at org.apache.hadoop.hbase.backup.impl.BackupManager.updateBackupInfo(BackupManager.java:396) at org.apache.hadoop.hbase.backup.master.FullTableBackupProcedure.beginBackup(FullTableBackupProcedure.java:130) at org.apache.hadoop.hbase.backup.master.FullTableBackupProcedure.executeFromState(FullTableBackupProcedure.java:502) at org.apache.hadoop.hbase.backup.master.FullTableBackupProcedure.executeFromState(FullTableBackupProcedure.java:69) at org.apache.hadoop.hbase.procedure2.StateMachineProcedure.execute(StateMachineProcedure.java:107) at org.apache.hadoop.hbase.procedure2.Procedure.doExecute(Procedure.java:443) at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.execProcedure(ProcedureExecutor.java:934) at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.execLoop(ProcedureExecutor.java:736) at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.execLoop(ProcedureExecutor.java:689) at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.access$200(ProcedureExecutor.java:73) at org.apache.hadoop.hbase.procedure2.ProcedureExecutor$1.run(ProcedureExecutor.java:416)

Any help please?

Thank you in advance.

8 REPLIES 8

Re: Fail to create hbase full backup

Super Guru

@Wael Horchani

Where did you find "hbase backup"? Can you please point to some documentation on backup option for hbase command?

you create HBase backups using Distcp or copyTable or export utility or replication to another cluster. I have never seen "hbase backup" so I'd be very interested in learning more about it.

Re: Fail to create hbase full backup

Rising Star
Highlighted

Re: Fail to create hbase full backup

Guru

Did you enable the backup configuration? It should be there in the HDP2-5. documentation.

@mqureshi you can read this: http://hortonworks.com/blog/coming-hdp-2-5-incremental-backup-restore-apache-hbase-apache-phoenix/

Re: Fail to create hbase full backup

New Contributor

You get this error if you drop the backup table in hbase namespace. Check if you have the namespace and table:

hbase(main):001:0> list_namespace
NAMESPACE
default
hbase
3 row(s) in 0.0220 seconds
hbase(main):002:0> list_namespace_tables 'hbase'
TABLE
acl
backup
meta
namespace
4 row(s) in 0.0280 seconds

If you have a backup of any table then you can run restore of that table and hbase will recreate the backup table:

[hbase@sandbox ~]$ hadoop dfs -ls /user/hbase/backup
Found 2 items
drwxr-xr-x   - hbase hdfs          0 2017-02-11 17:43 /user/hbase/backup/backup_1486835033442
drwxr-xr-x   - hbase hdfs          0 2017-02-11 18:09 /user/hbase/backup/backup_1486836579046
[hbase@sandbox ~]$ hbase restore hdfs://sandbox.hortonworks.com:8020/user/hbase/backup/ backup_1486836579046 iemployee -overwrite
[...]2017-02-11 18:44:50,038 INFO  [main] impl.RestoreClientImpl: Restore for [iemployee] are successful!

Or you can explicitly issue the create command. (describe 'hbase:backup' gives this definition but have to change TTL from 'FOREVER' to '2147483647'):

create 'hbase:backup', {NAME => 'meta', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'ROW', REPLICATION_SCOPE => '0', COMPRESSION => 'NONE', VERSIONS => '1', TTL => '2147483647', MIN_VERSIONS => '0', KEEP_DELETED_CELLS => 'FALSE', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}, {NAME => 'session', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'ROW', REPLICATION_SCOPE => '0', COMPRESSION => 'NONE', VERSIONS => '1', TTL => '2147483647', MIN_VERSIONS => '0', KEEP_DELETED_CELLS => 'FALSE', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}

Re: Fail to create hbase full backup

Rising Star

@mhegedus

Hi, Thank you very much for your answer.

When listing the tables in namespace i don't see the backup table

hbase(main):001:0> list_namespace
NAMESPACE   
default   
hbase   
2 row(s) in 0.6120 seconds

hbase(main):002:0> list_namespace_tables 'hbase'
TABLE   
meta   
namespace   
2 row(s) in 0.1050 seconds

I don't have another backed up table to use it to recreate backup table.

The last chance was to recreate the backup table. but he tell me that the table already exist. Any help please?

hbase(main):001:0> create 'hbase:backup', {NAME => 'meta', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'ROW', REPLICATION_SCOPE => '0', COMPRESSION => 'NONE', VERSIONS => '1', TTL => '2147483647', MIN_VERSIONS => '0', KEEP_DELETED_CELLS => 'FALSE', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}, {NAME => 'session', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'ROW', REPLICATION_SCOPE => '0', COMPRESSION => 'NONE', VERSIONS => '1', TTL => '2147483647', MIN_VERSIONS => '0', KEEP_DELETED_CELLS => 'FALSE', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE => 'true'}

ERROR: Table already exists: hbase:backup!

Re: Fail to create hbase full backup

New Contributor

@Wael Horchani That is strange. Maybe I was wrong and the table is there. Is security enabled? Are you using HDP, HDP Sandbox, CDH or vanilla Hadoop? Please edit the question to add details about your setup.

Re: Fail to create hbase full backup

New Contributor

Re: Fail to create hbase full backup

Rising Star

@mhegedus

In fact the cluster is one single machine (centos 7). HDP 2.5 installed.

Don't have an account?
Coming from Hortonworks? Activate your account here