Save Hive Metastore by Dumping

You must dump the Hive metastore metadata immediately before upgrading. Dumping the metastore data to a file is critical to prevent data loss.

  1. On the node where the database you use for Hive Metastore resides, dump Hive Metastore metadata before upgrading to HDP.
    For example, in MySQL, dump each database as follows:
    mysqldump <hive_db_schema_name> > </path/to/dump_file>
    In Postgres, dump each database as follows:
    pg_dump --opt <metastore_db_name> > /path/to/dump_file
  2. Proceed to upgrade HDP, assuming no Hive update, delete, or merge occurred after compaction; otherwise, repeat the compaction and Hive Metastore dump procedures, and then upgrade HDP.