Backups

Backups are enabled by default. The Forgejo instance will be backed up daily at a randomly chosen time between 22:00 and 4:00.

You can specify a different backup time and interval using the following backup configuration:

apiVersion: vshn.appcat.vshn.io/v1
kind: VSHNForgejo
metadata:
  name: forgejo-app1-prod
  namespace: <your-namespace>
spec:
  parameters:
    ...
    backup:
      schedule: 0 22 * * * (1)
    ...
1 The schedules for your backups.
The backup relies on forgejo dump which collects all the data into a single archive, including the database.

Retention

By default, backups are retained for 6 daily backups.

To change the retention period, configure the backup.retention field:

apiVersion: vshn.appcat.vshn.io/v1
kind: VSHNForgejo
metadata:
  name: forgejo-app1-prod
  namespace: <your-namespace>
spec:
  parameters:
    ...
    backup:
      retention:
        keepDaily: 14 (1)
    ...
1 Number of daily backups to retain (default: 6). Additional retention options are keepLast, keepHourly, keepWeekly, keepMonthly, and keepYearly.

Disable Backups

To disable backups, set the backup.enabled field to false:

apiVersion: vshn.appcat.vshn.io/v1
kind: VSHNForgejo
metadata:
  name: forgejo-app1-prod
  namespace: <your-namespace>
spec:
  parameters:
    ...
    backup:
      enabled: false
    ...

If backups were previously enabled, existing backups will be retained until their retention period expires.

Disabling backups is meant for test instances only. It is not recommended to disable backups for production instances.