Schedule

Have a target back itself up on a schedule.

PocketBase runs the cron itself, in the process already serving the app, so there is nothing to install on the server.

Syntax

$ vela backup schedule                 # show the current schedule
$ vela backup schedule "0 3 * * *"     # every day at 03:00 UTC
$ vela backup schedule "0 3 * * *" --keep 14
$ vela backup schedule --off

Options

  • --keep <n> - How many scheduled archives to keep, defaults to 7
  • --off - Stop backing up automatically
  • -t, --target <target> - Which copy of the app to act on, defaults to production
  • --server <ssh> - Server this target runs on, recorded on first use

--keep prunes only the archives the schedule made. Ones from vela backup create are left alone.

A schedule is not yet disaster recovery

By default the archives are written to the same disk as the data they protect. Set PB_BACKUPS_S3_ENDPOINT, PB_BACKUPS_S3_BUCKET, PB_BACKUPS_S3_REGION, PB_BACKUPS_S3_ACCESS_KEY and PB_BACKUPS_S3_SECRET with vela env set to send them to a bucket instead, or download them on a schedule of your own.