borgmatic
by gabe565
borgmatic is simple, configuration-driven backup software for servers and workstations. Protect your files with client-side encryption. Backup your databases too. Monitor it all with integrated third-party services.
About this chart
Borgmatic
borgmatic is simple, configuration-driven backup software for servers and workstations. Protect your files with client-side encryption. Backup your databases too. Monitor it all with integrated third-party services.
Homepage: https://charts.gabe565.com/charts/borgmatic/
This chart is not maintained by the upstream project and any issues with the chart should be raised here
Source Code
- https://projects.torsion.org/borgmatic-collective/borgmatic
- https://github.com/borgmatic-collective/docker-borgmatic
Requirements
Kubernetes: >=1.21.0-0
Dependencies
| Repository | Name | Version |
|---|---|---|
| https://bjw-s.github.io/helm-charts | common | 1.5.1 |
Installing the Chart
To install the chart with the release name borgmatic
OCI (Recommended)
helm install borgmatic oci://ghcr.io/gabe565/charts/borgmatic
Traditional
helm repo add gabe565 https://charts.gabe565.com
helm repo update
helm install borgmatic gabe565/borgmatic
Uninstalling the Chart
To uninstall the borgmatic deployment
helm uninstall borgmatic
The command removes all the Kubernetes components associated with the chart including persistent volumes and deletes the release.
Configuration
Read through the values.yaml file. It has several commented out suggested values. Other values may be used from the values.yaml from the bjw-s common library.
Specify each parameter using the --set key=value[,key=value] argument to helm install.
helm install borgmatic \
--set env.TZ="America/New York" \
gabe565/borgmatic
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart.
helm install borgmatic gabe565/borgmatic -f values.yaml
Custom configuration
Deploy as a CronJob
If you prefer to use a CronJob instead of a Deployment, set the following values:
controller:
type: cronjob
cronjob:
schedule: 0 1 * * *
First Time Setup
-
After initial chart installation, you will need to initialize the Borg repository:
kubectl rollout status deployment.apps/borgmatic kubectl exec -i deployment.apps/borgmatic -- borgmatic --init --encryption repokey-blake2 -
Create an initial backup to ensure Borgmatic is configured correctly:
kubectl exec -it deployment.apps/borgmatic -- borgmatic create --stats -
Ensure you have stored the passphrase externally to prevent data loss.
Values
Important: When deploying an application Helm chart you can add more values from the bjw-s common library chart here
| Key | Type | Default | Description |
|---|---|---|---|
| configMaps.config | object | See values.yaml | Configure Borgmatic container under this key. |
| configMaps.config.data."config.yaml" | string | See values.yaml | Borgmatic config. [ref] |
| configMaps.config.data."crontab.txt" | string | "0 1 * * * PATH=$PATH:/usr/bin /usr/local/bin/borgmatic --stats -v 0 2>&1" | Crontab |
| controller.cronjob.backoffLimit | int | 0 | Only used when controller.type: cronjob. Sets the CronJob backoffLimit. |
| controller.cronjob.schedule | string | "0 * * * *" | Only used when controller.type: cronjob. Sets the backup CronJob time. |
| controller.type | string | "deployment" | Set the controller type. Valid options are deployment or cronjob. |
| env | object | See values.yaml | environment variables. [ref] |
| env.BORG_HOST_ID | string | Deployment namespace | Borg host ID used in archive names |
| image.pullPolicy | string | "IfNotPresent" | image pull policy |
| image.repository | string | "ghcr.io/borgmatic-collective/borgmatic" | image repository |
| image.tag | string | "1.9.9" | image tag |
| persistence.data | object | See values.yaml | Configure persistence settings for the chart under this key. |
| persistence.ssh | object | See values.yaml | Configure SSH credentials for the chart under this key. |
Autogenerated from chart metadata using helm-docs
Deploy borgmatic with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has borgmatic on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartborgmatic is pinned at v0.10.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply