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>
    If you use another database for the Hive Metastore, use the equivalent command, such as export for Postgres, to dump the database.
  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.