Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.rafftechnologies.com/llms.txt

Use this file to discover all available pages before exploring further.

Updated May 10, 2026 Manages a recurring backup schedule for a VM. The schedule auto-prunes backups older than keep_count, so backups it creates must not be managed via raff_backup — that fights the retention engine. For one-shot backups, use raff_backup.

Example — daily

resource "raff_backup_schedule" "api_nightly" {
  vm_id      = raff_vm.api.id
  frequency  = "daily"
  time       = "03:00"
  keep_count = 14
}

Example — weekly

resource "raff_backup_schedule" "web_weekly" {
  vm_id       = raff_vm.web.id
  frequency   = "weekly"
  day_of_week = "Saturday"
  time        = "04:00"
  keep_count  = 4
}

Argument reference

Required

ArgumentTypeDescription
vm_idstring (UUID)Source VM. ForceNew — point at a different schedule’s VM by replacing the resource
frequencystringdaily or weekly
timestringTime of day, e.g. 08:00 or 8am
keep_countintNumber of backups to retain before auto-pruning

Optional

ArgumentTypeDescription
day_of_weekstringDay of week (Monday–Sunday). Required when frequency = "weekly"

Attribute reference (computed)

AttributeDescription
idSchedule ID
nameAuto-generated schedule name
runtimeNext scheduled run time
regionRegion (mirrors the source VM’s region)
price_per_hourHourly price in USD for the storage the schedule’s backups consume

Lifecycle

OperationBehavior
terraform apply (create)Creates the schedule. The first backup runs at the next time slot
Change frequency, time, day_of_week, keep_countIn-place update
Change vm_idReplacement — destroy + recreate
terraform destroyDeletes the schedule. Existing backups it created remain — delete via raff backup delete if no longer needed

Importing existing schedules

terraform import raff_backup_schedule.api_nightly <schedule-id>

Permissions

The API key needs vm.backup in the project. The system role Project Admin grants this.

Data sources

# Single schedule by ID
data "raff_backup_schedule" "api_nightly" {
  id = 9
}

# All schedules in the current project
data "raff_backup_schedules" "all" {}

raff_backup

One-shot backup (don’t combine with schedule-created backups).

raff_vm

Compute resource the schedule is attached to.

CLI: raff backup schedule

Imperative equivalent.
Last modified on May 11, 2026