The Schedule CRD allows you to automate all other K8up operations (Backup, Restore, Archive, Check, Prune) on a recurring basis. You define the timing for each operation type and the storage backend to be used.
Key components of a Schedule include:
archive: Configuration for archival jobs.backend: The storage destination (e.g., S3, Azure, GCS).check: Configuration for repository integrity checks.backup: Configuration for the backup jobs, including cron schedules and history limits.prune: Configuration for snapshot retention and cleanup.
Note: failedJobsHistoryLimit and successfulJobsHistoryLimit control how many finished job/pod objects are kept after cleanup. They default to 3.
apiVersion: k8up.io/v1
kind: Schedule
metadata:
name: schedule-test
spec:
backend:
repoPasswordSecretRef:
name: backup-repo
key: password
s3:
endpoint: http://10.144.1.224:9000
bucket: k8up
accessKeyIDSecretRef:
name: backup-credentials
key: username
secretAccessKeySecretRef:
name: backup-credentials
key: password
archive:
schedule: '0 * * * *'
restoreMethod:
s3:
endpoint: http://10.144.1.224:9000
bucket: restoremini
accessKeyIDSecretRef:
name: backup-credentials
key: username
secretAccessKeySecretRef:
name: backup-credentials
key: password
backup:
schedule: '* * * * *'
failedJobsHistoryLimit: 4
successfulJobsHistoryLimit: 0
promURL: http://10.144.1.224:9000
check:
schedule: '*/5 * * * *'
promURL: http://10.144.1.224:9000
prune:
schedule: '*/2 * * * *'
retention:
keepLast: 5
keepDaily: 14