Skip to Content

Disaster recovery

Back up the stores of a namespace to an S3 bucket on a schedule, and restore a Backup into other stores or into the stores that it came from.

This page lists the spec and status fields of Backup, BackupSchedule and Restore, each with its type, its limits and its description. The Platform page explains the concept, and the metadata of every kind is the same.

Backup

apiVersion: funcd.io/v1alpha1
kind: Backup
metadata:
  name: lakehouse-now
  namespace: default
  resourceGroup: rg1
spec:
  schedule: lakehouse-nightly
apiVersionkind
funcd.io/v1alpha1Backup

Backup.spec

FieldType and limitsDescription
schedulestring, required, a DNS-1123 labelThe BackupSchedule of the namespace whose scope, target and recipients the run uses, read when the run starts: a schedule gone by then fails the Backup with reason ScheduleNotFound. The schedule's status counts every Backup that names it.
ttlstring, a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms)How long funcd keeps the record after its creation; 0s or unset means the schedule's ttl, or 720h when the schedule does not exist. A ttl longer than the schedule's is refused.

Backup.status

FieldType and limitsDescription
completionTimestring, an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03
.965Z)
When the run ended, Succeeded or Failed.
conditionsarray of ConditionThe conditions that explain the phase.
expireTimestring, an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03
.965Z)
When funcd deletes this record, once the run has ended: the Backup's creation plus its spec.ttl, else plus its schedule's ttl. The copy on the target stays until the target's own lifecycle rule removes it.
membersarray of Backup.status.members[]The stores the copy holds, which a Restore names as they are listed here. A Bucket's member holds none of the data of the Lakes located on its prefixes: each of them is a member of its own.
observedGenerationintegerThe generation of the spec that funcd last acted on.
pathstringThe copy's directory on the target, <namespace>/<backup>-<uid>/.
phasestring, one of Pending, Running, Paused, Succeeded, Failed, CancelledPending, then Running, then Succeeded or Failed, in one attempt: funcd does not retry a failed Backup. A Backup that was Running when funcd stopped ends at the next start, Succeeded with reason FoundOnTarget when its copy is whole on the target, else Failed with reason Interrupted.
recipientsarray of string valuesFingerprints of the age recipients the copy is sealed to, sorted. A Restore whose identity matches none of them fails, its message naming both sets of fingerprints. A Backup recorded with reason FoundOnTarget lists none.
startTimestring, an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03
.965Z)
When the run began.
targetstringThe target URL the run wrote to: its schedule's spec.target.url at the time. A Restore reads the copy there.

Backup.status.members[]

FieldType and limitsDescription
bytesintegerThe size of the member's sealed copy on the target, in bytes.
kindstring, requiredThe member's kind: KVStore, Bucket, Lake, SQLDatabase, Function for a Function's local volume, or an add-on's kind for an add-on object.
namestring, required, a DNS-1123 labelThe member's name: the store's, or for a volume, its Function's.
volumestring, a DNS-1123 labelWith kind Function, the name of the Function's local volume that the member is.

BackupSchedule

# Test values: backups-key holds the S3 key pair that the banner of funcdctl dev prints, and restore.yaml publishes the
# identity of the first recipient, so neither protects anything.
apiVersion: funcd.io/v1alpha1
kind: BackupSchedule
metadata:
  name: lakehouse-nightly
  namespace: default
  resourceGroup: rg1
spec:
  schedule: 0 3 * * *
  scope:
    buckets:
      - lakehouse
  target:
    url: s3://backups?endpoint=http://127.0.0.1:8082&region=us-east-1&use_path_style=true
    credentialsSecret: backups-key
  encryption:
    recipients:
      - age1gvngj00ucwlleuk898r0s3umcacr5mxhkv4fy67evygxsmlgpanq43ttm3
      - age1263g0rath75xcgy9wh9cd6p9tpdn6wq35t5fa5pajnna4u7tgyhsxd384c
apiVersionkind
funcd.io/v1alpha1BackupSchedule

BackupSchedule.spec

FieldType and limitsDescription
encryptionobject, BackupSchedule.spec.encryptionThe age recipients that seal the member files of each Backup. It is required: a schedule with fewer than 2 recipients is refused.
pausedbooleanWhile true, the schedule creates no Backup and rpoRisk stays false; a Backup created by hand still runs. Once it is false again, the slots missed meanwhile collapse into one Backup.
schedulestring, requiredThe cron slots at which the schedule creates a Backup: 5 fields (minute hour day-of-month month day-of-week) or a macro such as @daily, in timeZone. Slots missed during downtime, a pause or a hold collapse into one Backup, and a slot that comes while one of the schedule's Backups is Pending or Running creates none.
scopeobject, BackupSchedule.spec.scope, requiredThe stores each Backup copies, in one form: the lists kvStores, buckets, lakes, databases, volumes and addons, or app, or resourceGroup. funcd resolves it at each run: a member or App it names that is missing then fails the Backup with reason MemberNotFound, and a scope of more than workloadBackup.maxCopyMembers members fails it with no copy written. In an App's spec.backupSchedules entry, an empty scope backs up that App.
targetobject, BackupSchedule.spec.target, requiredWhere each Backup writes its copy: an S3 bucket and the Secret of its write key.
timeZonestringThe IANA time zone of schedule, such as Europe/Paris; UTC when empty.
ttlstring, a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms)How long funcd keeps each Backup's record after its creation; 0s or unset means 720h. Only the record goes: the copy stays on the target until the target's own lifecycle rule expires it. A Backup may set a shorter spec.ttl, never a longer one.

BackupSchedule.spec.encryption

FieldType and limitsDescription
recipientsarray of string values, requiredThe age recipients, each entry one recipient: at least 2 distinct ones, such as an owner's and a recovery one, all X25519 or all hybrid (age1pq1). Every member file of each Backup is sealed to all of them, so the identity of any one opens it. The copy's manifest.yaml, which names the members, their files' sizes and these recipients' fingerprints, is not sealed.

BackupSchedule.spec.scope

FieldType and limitsDescription
addonsarray of string values, each a DNS-1123 labelAdd-on objects of the namespace to copy, by name, whatever their kind, each once: each copy is the newest snapshot that the object's engine wrote under its Addon's snapshot.path, copied as it is. An object whose Addon declares no snapshot, or whose engine has written none yet, fails the Backup with reason NoSnapshot.
appstring, a DNS-1123 labelAn App of the namespace: each Backup copies the stores of its kv, buckets, lakes and sql entries, ref entries included, and the local volumes of the Functions it declares. Set it alone, with no other scope field.
bucketsarray of string values, each a DNS-1123 labelBuckets of the namespace to copy, by name, each once. A Bucket's copy holds none of the data of the Lakes located on its prefixes: each of them is copied as a member of its own.
databasesarray of string values, each a DNS-1123 labelSQLDatabases of the namespace to copy, by name, each once. A database whose engine is not Ready fails the Backup with reason EngineNotReady.
kvStoresarray of string values, each a DNS-1123 labelKVStores of the namespace to copy, by name, each once.
lakesarray of string values, each a DNS-1123 labelLakes of the namespace to copy, by name, each once. A Lake located on a prefix of a listed Bucket is copied without being named here. A Lake that deletes files during each of a run's copies, as a busy one may, fails the Backup with reason LakeUnstable, and so does a Bucket that brings it in.
resourceGroupstring, a DNS-1123 labelA resource group of the namespace: each Backup copies its KVStores, Buckets, Lakes and SQLDatabases, and its add-on objects whose Addon declares a snapshot, but not its Functions' local volumes. Set it alone, with no other scope field.
volumesarray of string valuesLocal volumes of the namespace's Functions to copy, each as <function>/<name>, both DNS-1123 labels, and listed once. A volume is read live, file by file, so its copy is not a single point in time.

BackupSchedule.spec.target

FieldType and limitsDescription
credentialsSecretstring, required, a DNS-1123 labelA Secret of the namespace with AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and, optionally, AWS_SESSION_TOKEN: the key each Backup writes with. It needs only put and list on the bucket.
urlstring, requiredThe s3:// URL of the bucket that receives the copies, its options as query parameters, such as s3://backups?region=eu-west-3. The bucket of blob.target is refused, and another bucket on its endpoint is accepted with reason SameProvider on the schedule's Ready condition: one failure of that provider takes both. The bucket must accept a create-if-absent put (If-None-Match: *): a bucket that refuses it fails each Backup with reason TargetUnconditional.

BackupSchedule.status

FieldType and limitsDescription
activestring, a DNS-1123 labelA Backup of the schedule that is Pending or Running, empty when none is.
conditionsarray of ConditionThe conditions that explain the phase.
earliestRestorePointstring, an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03
.965Z)
When the oldest of the schedule's Succeeded Backups that still exist started: the oldest point a Restore can go back to.
lastScheduleTimestring, an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03
.965Z)
The newest slot the schedule has taken, whether it created a Backup or, finding one of its Backups still Pending or Running, created none.
lastSuccessTimestring, an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03
.965Z)
When the newest of the schedule's Succeeded Backups that still exist completed.
observedGenerationintegerThe generation of the spec that funcd last acted on.
phasestring, one of Pending, Deploying, Ready, Idle, Degraded, Failed, TerminatingWhere the object is in its lifecycle.
rpoRiskbooleanTrue when the schedule has fallen behind: the first slot after the start of its newest Succeeded Backup, or after its creation when there is none, has passed with that slot's Backup Failed or missing, or a second slot has passed. It stays false while the schedule is paused. funcd logs workload backup rpo at risk when it turns true.

Restore

# Test values: backups-key holds the S3 key pair that the banner of funcdctl dev prints, and backups-identity holds the
# published identity of the first recipient of the copy.
apiVersion: funcd.io/v1alpha1
kind: Restore
metadata:
  name: lakehouse-restore
  namespace: default
  resourceGroup: rg1
spec:
  backup: lakehouse-now
  source:
    credentialsSecret: backups-key
    identitySecret: backups-identity
  members:
    - kind: Bucket
      name: lakehouse
      as: lakehouse-copy
apiVersionkind
funcd.io/v1alpha1Restore

Restore.spec

FieldType and limitsDescription
backupstring, required, a DNS-1123 labelThe Backup to load, in the Restore's namespace. The Restore waits while it is Pending or Running, and fails with reason BackupNotReady when it is missing or Failed.
membersarray of Restore.spec.members[], requiredThe members of the Backup to load, at least one and each once, loaded in this order after funcd has checked the whole copy and every destination. A Bucket's member leaves its destination's Lake prefixes as they are: to restore those Lakes, name them as members too.
sourceobject, Restore.spec.source, requiredThe Secrets that read the Backup's copy and open its seal.

Restore.spec.members[]

FieldType and limitsDescription
asstring, a DNS-1123 labelThe destination: the name of an existing, empty store of the member's kind in the namespace, or for a volume, of a Function whose local volume of that name is empty. A SQLDatabase is empty with no table, view, index or trigger and no Function binding it. Exactly one of as, asLocation and inPlace; a Lake takes asLocation or inPlace.
asLocationobject, Restore.spec.members[].asLocationFor a Lake: the bucket and prefix that receive its copy, where no Lake is located and nothing is stored yet; a Lake located there afterwards reads it. The bucket must exist and may not be one this Restore restores in place. Exactly one of as, asLocation and inPlace.
inPlacebooleanLoad the member back into its own store, replacing its data; a Function's volume is loaded only when empty or named by its Function's DataMissing condition. The Restore then needs update on the Namespace, as an admin has, and another in-place Restore of the namespace is refused until it ends. It first takes the export Backup that status.export names, which needs the restored Backup's schedule, then holds the namespace while it loads: a failed load keeps the hold until funcdctl hold release --namespace. Exactly one of as, asLocation and inPlace.
kindstring, requiredThe member's kind, as the Backup's status.members lists it: KVStore, Bucket, Lake, SQLDatabase, Function for a Function's local volume, or an add-on's kind for an add-on object, which takes inPlace only.
namestring, required, a DNS-1123 labelThe member's name, as the Backup's status.members lists it: the store's, or for a volume, its Function's. A member the copy does not hold fails the Restore with reason MemberNotFound.
volumestring, a DNS-1123 labelWith kind Function, which needs it, the name of the Function's local volume that the member is. Any other kind takes none.

Restore.spec.members[].asLocation

FieldType and limitsDescription
bucketstring, required, a DNS-1123 labelA Bucket of the same namespace.
prefixstring, required, a DNS-1123 labelA prefix of that Bucket.

Restore.spec.source

FieldType and limitsDescription
credentialsSecretstring, required, a DNS-1123 labelA Secret of the namespace with AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and, optionally, AWS_SESSION_TOKEN: the key the Restore reads the copy with, at the Backup's status.target. A read-only key is enough.
identitySecretstring, a DNS-1123 labelA Secret of the namespace whose AGE_IDENTITY key holds age identities, X25519 or hybrid and not passphrase-encrypted, one of them for a recipient the Backup is sealed to. It is required: a Restore without it is refused.

Restore.status

FieldType and limitsDescription
completionTimestring, an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03
.965Z)
When the Restore ended, Succeeded or Failed.
conditionsarray of ConditionThe conditions that explain the phase.
exportstring, a DNS-1123 labelThe Backup that an in-place Restore takes before it loads, <restore>-before, of the restored Backup's schedule. Empty when no member is in place.
observedGenerationintegerThe generation of the spec that funcd last acted on.
phasestring, one of Pending, Running, Paused, Succeeded, Failed, CancelledPending while it waits for its Backup and, in place, for its export; Running while it checks the whole copy and loads; then Succeeded or Failed. A Restore that was Running when funcd stopped ends Failed with reason Interrupted.
startTimestring, an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03
.965Z)
When the Restore turned Running, once its Backup and any export had Succeeded.

HTTP API

The table lists each described operation of these kinds, with its method and path. The operation's page in the API reference gives its parameters, its body, its authentication and every answer, with when it happens and what to do.

MethodPathOperation
GET/apis/funcd.io/v1alpha1/namespaces/{namespace}/backupsList the Backups of a namespace
POST/apis/funcd.io/v1alpha1/namespaces/{namespace}/backupsCreate a Backup
GET/apis/funcd.io/v1alpha1/namespaces/{namespace}/backups/{name}Read a Backup
PUT/apis/funcd.io/v1alpha1/namespaces/{namespace}/backups/{name}Replace a Backup
DELETE/apis/funcd.io/v1alpha1/namespaces/{namespace}/backups/{name}Delete a Backup
GET/apis/funcd.io/v1alpha1/namespaces/{namespace}/backupschedulesList the BackupSchedules of a namespace
POST/apis/funcd.io/v1alpha1/namespaces/{namespace}/backupschedulesCreate a BackupSchedule
GET/apis/funcd.io/v1alpha1/namespaces/{namespace}/backupschedules/{name}Read a BackupSchedule
PUT/apis/funcd.io/v1alpha1/namespaces/{namespace}/backupschedules/{name}Replace a BackupSchedule
DELETE/apis/funcd.io/v1alpha1/namespaces/{namespace}/backupschedules/{name}Delete a BackupSchedule
GET/apis/funcd.io/v1alpha1/namespaces/{namespace}/restoresList the Restores of a namespace
POST/apis/funcd.io/v1alpha1/namespaces/{namespace}/restoresCreate a Restore
GET/apis/funcd.io/v1alpha1/namespaces/{namespace}/restores/{name}Read a Restore
PUT/apis/funcd.io/v1alpha1/namespaces/{namespace}/restores/{name}Replace a Restore
DELETE/apis/funcd.io/v1alpha1/namespaces/{namespace}/restores/{name}Delete a Restore
GET/apis/funcd.io/v1alpha1/holdRead the hold and its evidence
POST/apis/funcd.io/v1alpha1/hold/releaseRelease the hold of the platform or of namespaces
GET/apis/funcd.io/v1alpha1/platformbackupRead the status of the platform backup
POST/apis/funcd.io/v1alpha1/quarantine/returnReturn quarantined data into its object

On this page