Created 01-17-2017 05:54 PM
Hi,
I am able to backup all my hive tables by backuping the HDFS folder /apps/hive/warehouse and the MySQL database (mysql dump and restore).
How can I backup some Hive tables only? for HDFS files it's easy. But how can I backup/restore the metadata from MySQL for only those tables ?
Cheers!
Joe
Created 01-17-2017 06:03 PM
Hi @Joe Harvy
You can create scripts that will create the databases and tables based off the Hive metastore. This blog walks you through the step.
https://sharebigdata.wordpress.com/2016/06/12/hive-metastore-internal-tables/
Created 01-17-2017 06:03 PM
Hi @Joe Harvy
You can create scripts that will create the databases and tables based off the Hive metastore. This blog walks you through the step.
https://sharebigdata.wordpress.com/2016/06/12/hive-metastore-internal-tables/
Created 02-22-2017 12:15 PM
Great post @Scott Shaw
The partial backup/restore of Hive metastore can be a good new feature for Hive.
In general Hive Metastore is shared by many projects/teams , and at the moment we are unable to restore the metadata for one team ( only few tables ) without impacting the others.
Created 02-28-2017 05:35 AM
One another way to backup/restore specific hive tables would be to use 'show create table' to back up DDL which could be used to recreate the table. Then the saved hdfs files could be dropped to warehouse dir to finish the table restore.
beeline -u jdbc:hive2://<cluster-name>:<port#>/<db-name> --outputformat=csv -e "show create table <table-name>;" > <table_name>.ddl