|
|
2 minggu lalu | |
|---|---|---|
| README.org | 1 tahun lalu | |
| backup.cronjob.yaml | 1 bulan lalu | |
| backup.pod.yaml | 1 bulan lalu | |
| backup.remote.cronjob.yaml | 2 minggu lalu | |
| backup.remote.pod.yaml | 2 minggu lalu | |
| cert-manager-letsencrypt-prod.yaml | 2 tahun lalu | |
| cert-manager.yaml | 2 tahun lalu | |
| container-registry.yaml | 1 tahun lalu | |
| dav.yaml | 2 minggu lalu | |
| docker-image-update-notifier.yaml | 2 minggu lalu | |
| git.yaml | 9 bulan lalu | |
| ntfy.yaml | 2 bulan lalu | |
| pwd.yaml | 2 minggu lalu | |
| system-upgrade-controller.yaml | 1 tahun lalu | |
| system-upgrade-plans.yaml | 1 tahun lalu | |
| webdav.yaml | 2 minggu lalu |
Restic is used to create incremental backups.
Host raspberrypi4 is set for backing up glusterfs files.
All glusterfs files are mounted under /mnt.
An NFS drive is mounted under /data/backup as the backup destination.
/etc/fstab entries:
localhost:/dockervol /mnt glusterfs defaults,_netdev,noauto,x-systemd.automount 0 0 192.168.1.1:/mnt/sda1/backup /data/backup nfs defaults 0 0
Apply backup.cronjob.yaml.
Run kubectl create job --from=cronjob/backup backup-manual.
Apply backup.pod.yaml.
It creates a restic-cli pod on raspberrypi4.
kubectl exec -it restic-cli -- /bin/sh gives you a shell in the pod's container.
Select the snapshot id by running restic --repo /data/repo snapshots --insecure-no-password.
Run restic --repo /data/repo restore <snapshot_id> /data/glusterfs --insecure-no-password to fully restore from a snapshot.
Rclone sync is used to copy the local restic repo to a remote destination.
Remote destination is currently an Oracle Object Storage called backup in davidnabraczkyhajos tenancy.
The API key secret and the rclone/oci config maps are created in backup.remote.cronjob.yaml. Apply this before anything else, it will create a cron job that runs every Sunday at 8:00 am.
Apply backup.remote.cronjob.yaml.
Run kubectl create job --from=cronjob/backup-remote backup-remote-manual.
Apply backup.remote.pod.yaml.
It creates an rclone-cli pod on raspberrypi4.
kubectl exec -it rclone-cli -- /bin/sh gives you a shell in the pod's container.
Run rclone sync --progress --verbose --verbose --cache-workes 4 --transfers 4 --retries 32 oos:backup /data/repo/restore.
Use --dry-run first.