Skip to content

Backup your app

Velero enables you to back up your application’s configuration and resources. To automate backups, set up a Schedule that defines the interval between each backup.

Note: Deploy your Velero CRDs in the k8saas-system namespace in order for them to be picked up by Velero.

backup-schedule.yaml
apiVersion: velero.io/v1
kind: Schedule
metadata:
name: sample-backup-schedule
namespace: k8saas-system
spec:
paused: false
schedule: 0 1 * * *
# Optional: choose your backup storage location
# storageLocation: s3gw
template:
includedNamespaces:
- sample-namespace

By default, Velero stores backups in S3GW, a compatible object storage system. Below is the default configuration for the backup storage location.

Note: S3GW is located in-cluster and should be changed for production use to an external backup location.

backup-storage-location.yaml
apiVersion: velero.io/v1
kind: BackupStorageLocation
metadata:
name: s3gw
namespace: k8saas-system
spec:
default: true
provider: aws
accessMode: ReadWrite
config:
region: us-east-1
s3ForcePathStyle: "true"
s3Url: http://s3gw.k8saas-system.svc.cluster.local
objectStorage:
bucket: velero-backups
credential:
key: credentials
name: s3gw-aws-credentials

To verify your backup configuration and ensure it works:

  1. Access the Velero UI (available through Forecastle).
  2. Navigate to the backups and schedules list.
  3. Confirm that backups are being created according to your schedule. If backups are visible and correspond to the defined schedule, your integration is correctly configured.

Note: A backup without a successful restore test is not reliable. Always test restoring your backups to ensure their integrity.