Friday, February 22, 2013

Hbase Backup and Restory : Export / Import Mapreduce



Command to use for export:
-------------------------------------------------------------------------------------------------------
[incrimental backup]




bin/hadoop jar /path/to/hbase-0.20.3.jar export
Usage: Export <tablename> <outputdir> [<versions> [<starttime> [<endtime>]]]




[full one time backup]

bin/hadoop jar /path/to/hbase-0.20.3.jar export
Usage: Export <tablename> <outputdir>

 
Exporting table:
----------------------------------------------------------------------------------------------------------

bin/hadoop jar /path/to/hbase-0.20.3.jar export table_backed hdfs://<namenode>:9000/backupdata/table_backed

Copying from hdfs to local drive:
---------------------------------------------------------------------------------------------------------

bin/hadoop -copyToLocal /export/table_backed /somewhere/local

Copying from local to hdfs
---------------------------------------------------------------------------------------------------------

bin/hadoop -copyFromLocal /somewhere/local /import/table_backed

Importing to hdfs for hbase
---------------------------------------------------------------------------------------------------------

bin/hadoop jar /path/to/hbase-0.20.3.jar import table_backed  hdfs://<namenode>:9000/backupdata/table_backed


No comments:

Post a Comment

Thank you for Commenting Will reply soon ......

Featured Posts

#Linux Commands Unveiled: #date, #uname, #hostname, #hostid, #arch, #nproc

 #Linux Commands Unveiled: #date, #uname, #hostname, #hostid, #arch, #nproc Linux is an open-source operating system that is loved by millio...