Update pbs-client image on backups.
This commit is contained in:
@@ -28,32 +28,18 @@ spec:
|
|||||||
cpu: "250m"
|
cpu: "250m"
|
||||||
command: ["sh", "-c"]
|
command: ["sh", "-c"]
|
||||||
args:
|
args:
|
||||||
- |
|
- "#echo \"INFO: Starting export\"\n. /root/.gitea-inline-config/database\nexport PGPASSWORD=$PASSWD\n#echo \"INFO: Exporting database\"\npg_dump -h gitea-postgresql.git-limbosolutions-com.svc.cluster.local -U $USER -d $NAME > /data/postgresql-export/db_backup.sql\nif [ $? -ne 0 ]; then\n echo \"ERROR: Exporting database failed\"\n exit 1\nfi \n#echo \"INFO: Exporting database finished\"\n"
|
||||||
#echo "INFO: Starting export"
|
|
||||||
. /root/.gitea-inline-config/database
|
|
||||||
export PGPASSWORD=$PASSWD
|
|
||||||
#echo "INFO: Exporting database"
|
|
||||||
pg_dump -h gitea-postgresql.git-limbosolutions-com.svc.cluster.local -U $USER -d $NAME > /data/postgresql-export/db_backup.sql
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "ERROR: Exporting database failed"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
#echo "INFO: Exporting database finished"
|
|
||||||
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
|
||||||
- name: backup-run-data
|
- name: backup-run-data
|
||||||
mountPath: /data/postgresql-export
|
mountPath: /data/postgresql-export
|
||||||
subPath: postgresql-export
|
subPath: postgresql-export
|
||||||
|
|
||||||
- name: gitea-inline-config
|
- name: gitea-inline-config
|
||||||
mountPath: /root/.gitea-inline-config
|
mountPath: /root/.gitea-inline-config
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
|
||||||
containers:
|
containers:
|
||||||
- name: pbs-client
|
- name: pbs-client
|
||||||
### Maintained by flux - Image Update Automation
|
### Maintained by flux - Image Update Automation
|
||||||
image: oci.limbosolutions.com/public/pbs-client:latest # {"$imagepolicy": "git-limbosolutions-com:pbs-client"}
|
image: oci.limbosolutions.com/public/pbs-client:latest@sha256:8565b9d420051cdbd4a9054f29ada099d5c70554218aaed0078ec533117406fc # {"$imagepolicy": "git-limbosolutions-com:pbs-client"}
|
||||||
###
|
###
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
@@ -78,7 +64,6 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: gitea-backup
|
name: gitea-backup
|
||||||
key: PBS_FINGERPRINT
|
key: PBS_FINGERPRINT
|
||||||
|
|
||||||
command: ["bash", "-c"]
|
command: ["bash", "-c"]
|
||||||
args:
|
args:
|
||||||
- |
|
- |
|
||||||
@@ -90,35 +75,26 @@ spec:
|
|||||||
proxmox-backup-client backup gitea-data.pxar:/data/gitea-data postgresql-data.pxar:/data/postgresql-data postgresql-export.pxar:/data/postgresql-export --include-dev /data/postgresql-data --include-dev /data/postgresql-export --include-dev /data/gitea-data --backup-id "gitea-full" -ns git.limbosolutions.com
|
proxmox-backup-client backup gitea-data.pxar:/data/gitea-data postgresql-data.pxar:/data/postgresql-data postgresql-export.pxar:/data/postgresql-export --include-dev /data/postgresql-data --include-dev /data/postgresql-export --include-dev /data/gitea-data --backup-id "gitea-full" -ns git.limbosolutions.com
|
||||||
SCRIPT_DURATION=$(($(date +%s) - SCRIPT_START_TIME))
|
SCRIPT_DURATION=$(($(date +%s) - SCRIPT_START_TIME))
|
||||||
echo "INFO: Finished Backup of git.limbosolutions.com ($((SCRIPT_DURATION / 60 / 60)):$((SCRIPT_DURATION / 60)):$((SCRIPT_DURATION % 60))) "
|
echo "INFO: Finished Backup of git.limbosolutions.com ($((SCRIPT_DURATION / 60 / 60)):$((SCRIPT_DURATION / 60)):$((SCRIPT_DURATION % 60))) "
|
||||||
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: gitea-shared-storage
|
- name: gitea-shared-storage
|
||||||
mountPath: /data/gitea-data
|
mountPath: /data/gitea-data
|
||||||
|
|
||||||
- name: db-postgresql-data
|
- name: db-postgresql-data
|
||||||
mountPath: /data/postgresql-data
|
mountPath: /data/postgresql-data
|
||||||
|
|
||||||
- name: backup-run-data
|
- name: backup-run-data
|
||||||
mountPath: /data/postgresql-export
|
mountPath: /data/postgresql-export
|
||||||
subPath: postgresql-export
|
subPath: postgresql-export
|
||||||
|
|
||||||
- name: backup-run-data
|
- name: backup-run-data
|
||||||
mountPath: /tmp
|
mountPath: /tmp
|
||||||
subPath: tmp
|
subPath: tmp
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: gitea-shared-storage
|
- name: gitea-shared-storage
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: gitea-shared-storage
|
claimName: gitea-shared-storage
|
||||||
|
|
||||||
- name: db-postgresql-data
|
- name: db-postgresql-data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: data-gitea-postgresql-0
|
claimName: data-gitea-postgresql-0
|
||||||
|
|
||||||
- name: backup-run-data
|
- name: backup-run-data
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
|
||||||
- name: gitea-inline-config
|
- name: gitea-inline-config
|
||||||
secret:
|
secret:
|
||||||
secretName: gitea-inline-config
|
secretName: gitea-inline-config
|
||||||
Reference in New Issue
Block a user