You can back up and restore Hue data, such as a Hive or Impala query you saved in a
JSON document, in the Hue database to prevent losing the documents after rebuilding the
Database Catalog.
In Hue, you can view the JSON documents you created or imported in My documents.
Backup Hue documents you want to preserve from the command line.
# on hue pod
./build/env/bin/hue dumpdata -o /tmp/data.json
# on local machine
kubectl --kubeconfig ~/kconfig cp compute-1675582336-knmf/huebackend-0:/tmp/data.json -c hue ./data.json
Rebuild the Database Catalog as described in the previous topic.
Restore the Hue documents in the rebuilt Database Catalog.
#on local machine
kubectl --kubeconfig ~/kconfig cp ./data.json compute-1675582336-knmf/huebackend-0:/tmp/data.json -c hue
# on new hue pod
./build/env/bin/hue loaddata --ignorenonexistent /tmp/data.json