offsite backup fix packages wrong path, set max offsite size to 5Gb, reset borg repo
All checks were successful
/ continuous-deploy (push) Successful in 22s
All checks were successful
/ continuous-deploy (push) Successful in 22s
This commit is contained in:
@@ -82,7 +82,7 @@ spec:
|
|||||||
value: ssh -p 2222 -o StrictHostKeyChecking=no -o LogLevel=ERROR
|
value: ssh -p 2222 -o StrictHostKeyChecking=no -o LogLevel=ERROR
|
||||||
|
|
||||||
- name: REPO_SYNC_MAX_SIZE
|
- name: REPO_SYNC_MAX_SIZE
|
||||||
value: "21474836480" # 20GB
|
value: "5368709120" # 5GB
|
||||||
|
|
||||||
- name: MODE
|
- name: MODE
|
||||||
value: SHELL
|
value: SHELL
|
||||||
@@ -98,8 +98,8 @@ spec:
|
|||||||
# sleep 5
|
# sleep 5
|
||||||
# done
|
# done
|
||||||
|
|
||||||
borg create ${BORG_REPO}::postgresql-export-$(date +%Y%m%d%H%M%S) /data/postgresql-export
|
borg create::postgresql-export-$(date +%Y%m%d%H%M%S) /data/postgresql-export
|
||||||
borg create ${BORG_REPO}::gitea-data-$(date +%Y%m%d%H%M%S) /data/gitea-data --exclude /data/packages --exclude /data/tmp
|
borg create ${BORG_REPO}::gitea-data-$(date +%Y%m%d%H%M%S) /data/gitea-data --exclude /data/gitea-data/packages --exclude /data/gitea-data/tmp
|
||||||
|
|
||||||
#cleanup
|
#cleanup
|
||||||
borg prune -v --list --keep-daily=10 --keep-weekly=7 --keep-monthly=-1 ${BORG_REPO} --glob-archives='gitea-data*'
|
borg prune -v --list --keep-daily=10 --keep-weekly=7 --keep-monthly=-1 ${BORG_REPO} --glob-archives='gitea-data*'
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ metadata:
|
|||||||
namespace: git-limbosolutions-com
|
namespace: git-limbosolutions-com
|
||||||
labels:
|
labels:
|
||||||
app: borg-backup-sidekick
|
app: borg-backup-sidekick
|
||||||
|
dbAccess: "true"
|
||||||
|
backups.infra.limbosolutions.com/ssh: "true"
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: borg-backup-sidekick
|
- name: borg-backup-sidekick
|
||||||
@@ -21,14 +23,14 @@ spec:
|
|||||||
- name: BORG_REPO
|
- name: BORG_REPO
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: gitea-backup-secret
|
name: gitea-backup
|
||||||
key: borg_repo
|
key: BORG_REPO
|
||||||
|
|
||||||
- name: BORG_PASSPHRASE
|
- name: BORG_PASSPHRASE
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: gitea-backup-secret
|
name: gitea-backup
|
||||||
key: borg_passphrase
|
key: BORG_PASSPHRASE
|
||||||
|
|
||||||
- name: BORG_RSH
|
- name: BORG_RSH
|
||||||
value: ssh -p 2222 -o StrictHostKeyChecking=no -o LogLevel=ERROR
|
value: ssh -p 2222 -o StrictHostKeyChecking=no -o LogLevel=ERROR
|
||||||
@@ -47,12 +49,12 @@ spec:
|
|||||||
|
|
||||||
- name: gitea-backup-secrets
|
- name: gitea-backup-secrets
|
||||||
mountPath: /root/.ssh/id_rsa
|
mountPath: /root/.ssh/id_rsa
|
||||||
subPath: ssh_id_rsa
|
subPath: SSH_ID_RSA
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
|
||||||
- name: gitea-backup-secrets
|
- name: gitea-backup-secrets
|
||||||
mountPath: /app/borg/key
|
mountPath: /app/borg/key
|
||||||
subPath: borg_key
|
subPath: BORG_KEY
|
||||||
volumes:
|
volumes:
|
||||||
- name: gitea-backup-secrets
|
- name: gitea-backup-secrets
|
||||||
secret:
|
secret:
|
||||||
|
|||||||
Reference in New Issue
Block a user