Backups
Backups are enabled by default. The Nextcloud 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: VSHNNextcloud
metadata:
name: nextcloud-app1-prod
namespace: <your-namespace>
spec:
parameters:
...
backup:
schedule: 0 22 * * * (1)
...
| 1 | The schedules for your backups. |
| Self service restores are currently not available. Please open a ticket if you need to restore the data of your Nextcloud instance. |
Retention
A Nextcloud instance has two independent backup components: the Nextcloud application (via K8up) and the backing PostgreSQL database (via Barman Cloud).
Nextcloud application backup retention defaults to 6 daily backups.
To change it, configure the backup.retention field:
apiVersion: vshn.appcat.vshn.io/v1
kind: VSHNNextcloud
metadata:
name: nextcloud-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. |
PostgreSQL backup retention defaults to 6 days.
To change it, configure the postgreSQLParameters.backup.retention field:
apiVersion: vshn.appcat.vshn.io/v1
kind: VSHNNextcloud
metadata:
name: nextcloud-app1-prod
namespace: <your-namespace>
spec:
parameters:
...
postgreSQLParameters:
backup:
retention: 14 (1)
...
| 1 | Number of days to retain PostgreSQL backups (default: 6). |
Disabling Maintenance mode during backup
By default, Nextcloud will be put in Maintenance Mode during the backup. This ensures that the backups are in a consistent state.
You can disable Maintenance Mode with the skipMaintenance parameter.
apiVersion: vshn.appcat.vshn.io/v1
kind: VSHNNextcloud
metadata:
name: nextcloud-app1-prod
namespace: <your-namespace>
spec:
parameters:
...
backup:
skipMaintenance: true (1)
schedule: 0 22 * * *
...
| 1 | Skip maintenance mode during backups |
| It’s not recommended by Nextcloud and VSHN to disable the maintenance mode during backups. Use this at your own risk. |
Disable Backups
To disable backups, set the backup.enabled field to false for both the Nextcloud instance and the PostgreSQL database:
apiVersion: vshn.appcat.vshn.io/v1
kind: VSHNNextcloud
metadata:
name: nextcloud-app1-prod
namespace: <your-namespace>
spec:
parameters:
...
backup:
enabled: false
postgreSQLParameters:
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. |