diff --git a/manifests/config-backups.yaml b/manifests/config-backups.yaml index fba0785..746d647 100644 --- a/manifests/config-backups.yaml +++ b/manifests/config-backups.yaml @@ -6,8 +6,8 @@ metadata: name: daily-config namespace: openshift-adp spec: - schedule: "0 02 * * *" # 2 AM daily - + schedule: "0 02 * * *" # 2 AM daily + # Make backups readable, sortable, unique nameTemplate: "{{ .ScheduleName }}-{{ .Timestamp }}" @@ -15,27 +15,28 @@ spec: # Backup all namespaces includedNamespaces: - "*" - + # Labels for filtering and reporting - labels: - backup-type: config - schedule: daily - retention: short - + #labels: + # backup-type: config + # schedule: daily + # retention: short + # Exclude ephemeral/generated resources excludedResources: - events - events.events.k8s.io - - pipelineruns.tekton.dev # Completed pipeline runs - - taskruns.tekton.dev # Completed task runs - - replicasets.apps # Managed by deployments - - pods # Recreated by controllers - - endpoints # Auto-generated + - pipelineruns.tekton.dev # Completed pipeline runs + - taskruns.tekton.dev # Completed task runs + - replicasets.apps # Managed by deployments + - pods # Recreated by controllers + - endpoints # Auto-generated - endpointslices.discovery.k8s.io - + # No volume data - manifests only snapshotVolumes: false defaultVolumesToFsBackup: false - + # 14 days retention - ttl: 336h \ No newline at end of file + ttl: 336h + diff --git a/manifests/stateful-backups.yaml b/manifests/stateful-backups.yaml index e761168..06a485d 100644 --- a/manifests/stateful-backups.yaml +++ b/manifests/stateful-backups.yaml @@ -6,8 +6,8 @@ metadata: name: daily-stateful namespace: openshift-adp spec: - schedule: "0 03 * * *" # 3 AM daily (after config backup) - + schedule: "0 03 * * *" # 3 AM daily (after config backup) + nameTemplate: "{{ .ScheduleName }}-{{ .Timestamp }}" template: @@ -20,12 +20,12 @@ spec: - n8n - apim - gitea-ci - - labels: - backup-type: stateful - schedule: daily - retention: short - + + #labels: + # backup-type: stateful + # schedule: daily + # retention: short + # Exclude ephemeral resources excludedResources: - events @@ -34,14 +34,14 @@ spec: - taskruns.tekton.dev - replicasets.apps - pods - + # Use Kopia for volume backups snapshotVolumes: false defaultVolumesToFsBackup: true - + # 14 days retention ttl: 336h - + # Pre-backup hooks for data consistency hooks: resources: @@ -61,7 +61,7 @@ spec: - nodetool flush timeout: 5m onError: Continue - + # Gitea PostgreSQL: checkpoint before backup - name: gitea-postgres-checkpoint includedNamespaces: @@ -79,7 +79,7 @@ spec: - psql -U postgres -c 'CHECKPOINT;' timeout: 2m onError: Continue - + # Authentik PostgreSQL: checkpoint before backup - name: authentik-postgres-checkpoint includedNamespaces: @@ -96,4 +96,5 @@ spec: - -c - psql -U postgres -c 'CHECKPOINT;' timeout: 2m - onError: Continue \ No newline at end of file + onError: Continue +