Backing up Sisense configuration without taking full Sisense backup [Linux]
Sometimes there is a need to make a backup of Sisense configuration (zookeeper database) only, while Sisense application’s raw data (MongoDB) is not required. It is possible to do it without taking full Sisense backup that includes both configuration and Sisense assets.
Step-by-Step Guide:
Usually, manual backup of the configuration is not required since it is being already collected by Sisense on a daily basis and can be found in /opt/sisense/storage/configuration directory. In UI - "configuration" folder in File Management. Each daily backup is stored in JSON format.
In rare scenarios, in case "configuration" folder is empty (for example, application was just installed and automated backup was not created yet), it is possible to perform manual backup of the current configuration DB.
Steps for the manual configuration backup:
1, Run the following command:
=====
kubectl exec -it -n sisense $(kubectl -n sisense get pods --no-headers=true -l app=configuration -o custom-columns=":.metadata.name" | tail -n 1) -- node /usr/src/app/node_modules/@sisense/sisense-configuration/bin/sisense-conf export -p -c $(kubectl -n sisense get endpoints | grep -oE '\b[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:2181\b' | sed -n '1p') -o /tmp/zookeeperBackup.json
=====
2. Copy the backup to your local storage:
=====
kubectl cp sisense/$(kubectl -n sisense get pods --no-headers=true -l app=configuration -o custom-columns=":.metadata.name" | tail -n 1):/tmp/zookeeperBackup.json ~/zookeeperBackup.json
=====
3. Copy the backup from local storage to the “configuration” directory:
=====
kubectl cp ~/zookeeperBackup.json sisense/$(kubectl -n sisense get pods --no-headers=true -l app=management -o custom-columns=":.metadata.name"):/opt/sisense/storage/configuration/
=====
To restore the backup of the configuration (!NOTE - it will overwrite the current configuration):
navigate to Admin -> Server & Hardware -> System Management -> Configuration -> 5 clicks on Sisense logo -> Backups -> Select the backup file to be restored -> Click Restore
Conclusion
This article describes the process of saving/backing up the Sisense configuration and restoring the same without interacting with the full Sisense backup.
Disclaimer: This post outlines a potential custom workaround for a specific use case or provides instructions regarding a specific task. The solution may not work in all scenarios or Sisense versions, so we strongly recommend testing it in your environment before deployment. If you need further assistance with this, please let us know.