WARNING: This is a work in progress. It is not yet ready for production use.
This repo contains utilities for backing up and restoring UMH data.
It will back up the following:
- All Node-RED flows
- All Grafana dashboards
- The current Helm values for the united-manufacturing-hub chart
- All timescale tables used by the united-manufacturing-hub chart
- Settings of the Management Console Companion (configmap, secret, statefulset)
We do NOT back up:
- Other grafana data like Alerts, Users, ...
- Timescale data unrelated to the united-manufacturing-hub chart
- Any other data in the cluster
- TimescaleDB continuous aggregates
- If you want to back them up, please follow this guide
- TimescaleDB policies
- If you want to back them up, please follow this guide
Checkout our Documentation for a full Tutorial. TODO: Add link to documentation
.\backup.ps1 `
-IP <IP_OF_THE_SERVER_TO_BACK_UP> `
-GrafanaToken <YOUR_GRAFANA_API_ADMIN_TOKEN> `
-KubeconfigPath <PATH_TO_KUBECONFIG> `
-OutputPath <PATH_TO_LOTS_OF_SPACE> `
Checkout our Documentation for a full Tutorial. TODO: Add link to documentation
- Restoring Helm
.\restore-helm.ps1 ` -KubeconfigPath <PATH_TO_KUBECONFIG_OF_THE_NEW_SERVER> ` -BackupPath <FULL_PATH_TO_BACKUP_FOLDER>
- Wait after the Helm restore is done, for all pods to be running again
- Restoring Grafana
.\restore-grafana.ps1 ` -FullUrl http://<IP_OF_YOUR_NEW_SERVER>:8080 ` -Token <YOUR_GRAFANA_API_ADMIN_TOKEN_ON_THE_NEW_SERVER> ` -BackupPath <FULL_PATH_TO_BACKUP_FOLDER>
- Restoring Node-RED
.\restore-nodered.ps1 ` -KubeconfigPath <PATH_TO_KUBECONFIG_OF_THE_NEW_SERVER> ` -BackupPath <FULL_PATH_TO_BACKUP_FOLDER>
- Restoring factoryinsight database in TimescaleDB
.\restore-timescale.ps1 ` -Ip <IP_OF_YOUR_NEW_SERVER> ` -BackupPath <FULL_PATH_TO_BACKUP_FOLDER> -PatroniSuperUserPassword <TIMESCALEDB_SUPERUSERPASSWORD>
- Restoring umh_v2 database in TimescaleDB
.\restore-timescale-v2.ps1 ` -Ip <IP_OF_YOUR_NEW_SERVER> ` -BackupPath <FULL_PATH_TO_BACKUP_FOLDER> -PatroniSuperUserPassword <TIMESCALEDB_SUPERUSERPASSWORD>
- Restoring the Management Console Companion
.\restore-companion.ps1 -KubeconfigPath <PATH_TO_KUBECONFIG_OF_THE_NEW_SERVER> -BackupPath <FULL_PATH_TO_BACKUP_FOLDER>