canasta backup schedule set
canasta > backup > backup schedule > set
canasta backup schedule set
Set a recurring backup schedule
Synopsis
Schedule recurring backups using a cron expression. The cron
expression follows the standard 5-field format
minute hour day-of-month month day-of-week.
On **Compose**, this writes a host crontab entry that runs
canasta backup create -i <id> --tag scheduled on the
schedule. Output goes to backup.log in the instance
directory.
On **Kubernetes**, this creates a CronJob named
canasta-backup-<id> in the instance namespace. The Job pod
runs mariadb-dump per database followed by restic backup
against the configured RESTIC_REPOSITORY. Both steps consume
credentials via the canasta-<id>-backup-env Secret —
including any cloud-backend env (AWS_*, B2_*, AZURE_*,
GOOGLE_*) the user set in .env. To inspect the rendered
schedule and resources, use `kubectl get cronjob
canasta-backup-<id> -n canasta-<id> -o yaml`.
Use --purge-older-than to chain `restic forget --prune
--keep-within <duration>` after each backup, so old snapshots
are pruned without a separate maintenance run.
Setting a new schedule replaces the existing one in place (same crontab entry name on Compose, same CronJob name on Kubernetes); duplicates aren't created.
canasta backup schedule set [flags]
Examples
canasta backup schedule set '0 2 * * *'
canasta backup schedule set '0 3 * * *' --purge-older-than 30d
Flags
| Flag | Shorthand | Description | Default | Required | Orchestrator |
|---|---|---|---|---|---|
--cron-expression |
Cron expression for the schedule | ✓ | Both | ||
--id |
-i |
Canasta instance ID | * | Both | |
--purge-older-than |
Purge backups older than this on each scheduled run | Both |
* Defaults to the Canasta instance matching the current directory, if any.
Global Flags
| Flag | Shorthand | Description | Default | Required | Orchestrator |
|---|---|---|---|---|---|
--help |
-h |
Show help message and exit | Both | ||
--verbose |
-v |
Enable verbose output | Both |