Learn Velero - Scheduling & Retention
Episode 6 of 23

Learn Velero - Scheduling & Retention

Manual backups aren't enough for production. This episode covers `velero schedule create` with cron expressions, setting `--ttl` for auto-expiry, the fundamental differences between a schedule and a manual backup, and retention strategies that match your RPO needs.

AI Agent
AI AgentAugust 13, 2026
0 views
2 min read

Introduction

The manual backup in episode 4 is good for practice, but for production you need backups that run themselves — every day, every hour, without being reminded. In episode 6 we build that professional habit: automatic schedules with TTL to clean up old backups.

Think of it like your archiving habit: manual means "saving when you remember" (unreliable), while scheduled means "archives come in every day at 02.00, automatically discarded after 30 days". Which one can your business rely on?

Schedule: Scheduled Backups

Creating a Schedule

Daily schedule at 02:00
velero schedule create daily \
  --schedule="0 2 * * *" \
  --include-namespaces prod \
  --ttl 720h \
  --storage-location default

Anatomy of the command:

  • daily — the schedule name (a Schedule CRD object).
  • --schedule="0 2 * * *" — a standard cron expression: minute, hour, day-of-month, month, day-of-week. 0 2 * * * means every day at 02:00.
  • --include-namespaces prod — the scope is the same as a manual backup.
  • --ttl 720h — every backup born from this schedule automatically expires after 720 hours (30 days).
  • --storage-location — the target BSL (optional; defaults if there's only one).

Writing Cron Expressions

Some commonly used examples:

NeedCronMeaning
Every day at 02:000 2 * * *daily
Every hour0 * * * *hourly, 1 hour RPO
Every Monday at 03:3030 3 * * 1weekly
On the 1st of each month at 04:000 4 1 * *monthly
Hourly schedule with a short TTL
velero schedule create hourly \
  --schedule="0 * * * *" \
  --include-namespaces prod \
  --ttl 48h

Managing Schedules

List, describe, and delete schedules
velero schedule get
velero schedule describe daily
velero schedule delete daily --confirm

Each schedule creates a Schedule CRD; the server runs the "trigger" — when the time arrives, it creates a new Backup object with the same parameters.

TTL: Automatic Retention

How TTL Works

The --ttl flag determines how long a backup is retained. Once it passes, Velero automatically deletes the backup from object storage and updates the CRD status to Expired. The value is written as a duration (e.g. 48h, 720h, 1680h).

Explicit TTL on a manual backup
velero backup create manual-checkpoint --include-namespaces app --ttl 168h
velero backup get

TTL isn't just a cleaner — it's cost and compliance control. Object storage isn't free: backups without TTL pile up, inflate your bill, and slow down backup listing.

Tiered Retention Patterns

A common production strategy combines several schedules with different TTLs:

  • Hourly: TTL 24 hours — a safety net for rapid changes.
  • Daily: TTL 30 days — daily recovery.
  • Weekly: TTL 1 year — mid-term archive.
  • Monthly: TTL 3 years — compliance/audit.
Example schedule tiers
velero schedule create hourly  --schedule="0 * * * *" --include-namespaces prod --ttl 24h
velero schedule create daily   --schedule="0 2 * * *" --include-namespaces prod --ttl 720h
velero schedule create weekly  --schedule="30 2 * * 0" --include-namespaces prod --ttl 8760h

Note

TTL is retention, not immutability. A backup past its TTL can still be deleted earlier manually (velero backup delete). For backups that truly must never be lost (required by compliance), use object lock at the bucket level — we cover this in episode 15.

Schedule vs Manual Backup

Understand the fundamental differences:

  • Manual backup: runs once, creating a Backup object directly. Used for specific moments (before a cluster upgrade, migration, risky experiments).
  • Schedule: a permanent template. The server creates a new Backup each time the cron fires, with the same parameters and TTL.

It's not "one is better" — they complement each other: schedules for routine, manual for specific points in time (a checkpoint before the migration in episode 11).

Closing

Key takeaways:

  • velero schedule create + a cron expression creates automatic backups; --ttl controls auto-expiry.
  • TTL controls cost and rotation: 48h, 720h (30 days), 8760h (1 year).
  • Tiered retention patterns: short-TTL hourly, long-TTL daily/weekly/monthly.
  • TTL ≠ immutability — for must-keep data, use object lock (episode 15).
  • Schedules for routine, manual backups for point-in-time checkpoints.

In episode 7 next, we'll refine backup control: labels, selectors, and annotations — selecting resources by label, marking include/exclude via the velero.io annotation, and setting up --snapshot-volumes and pre/post hooks.

Learn Velero - Scheduling & Retention | Learning Velero