Backup and Restore
The Jans Server should be backed up frequently, we recommend once daily.
There are multiple methods for backing up jans server. One way is manually using imperative commands. The other is automatically using open source tools.
Manual Backup and Restore#
Manual Backup#
-
Configmap backup:
kubectl get configmap cn -n <namespace> -o yaml > configmap-backup.yaml
-
Secret backup:
kubectl get secret cn -n <namespace> -o yaml > secret-backup.yaml
-
Get the user supplied values:
Save the values.yaml that was used in the initial jans installation using helm.
In the event that the user supplied or override values yaml was lost, you can obtain it by executing the following command:
helm get values <release name> -n <namespace>
-
Keep note of installed chart version:
helm list -n <namespace>
Keep note of the chart version. For example: 1.1.2
Manual Restore#
-
Create namespace
kubectl create namespace <namespace>
-
Configmap restore:
kubectl create -f configmap-backup.yaml
-
Secret restore:
kubectl create -f secret-backup.yaml
-
Insall jans using the override or user supplied values with the same chart version:
helm install <release-name> janssen/janssen -f values.yaml --version=<1.1.2> -n <namespace>
Automatic Backup and Restore#
There are several tools that helps in automatic backups and restore, like Kasten K10.
You can follow online guides to deploy it and using it to configure automatic backups.
Created: 2022-07-21