Managing Virtual WarehousesPDF version

Backing up and restoring Hue documents

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.
  • Avoid accessing or using the Hue web interface until the restore process is fully complete, as concurrent access may disrupt the operation and potentially lead to failure.
  • During the Hue database restore operation it is critical to block any traffic to the running Hue services. If you cannot bring down the cluster, use the recommended workaround to disable end user access to the cluster endpoints. Failing to do so results in errors in addition to existing key constraints and other issues.
  1. 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
  2. Rebuild the Database Catalog as described in the previous topic.
  3. 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

We want your opinion

How can we improve this page?

What kind of feedback do you have?