1. Worker Operations
  2. Kubernetes worker
  3. Scratch storage
Website
  • Worker operations
  • Kubernetes requirements
  • CPU and memory for workers and Jobs
  • Install a worker
  • Configure a worker
  • Scratch storage
  • Networking and egress
  • Worker security model
  • Worker health
  • Upgrade a worker
  • Troubleshooting

Scratch storage

Choose, size, monitor, and troubleshoot the temporary persistent volumes used by restore Jobs.

Loading documentation…

Configure a worker< PreviousNetworking and egressNext >

Powered by heyo

On this page

StorageClass requirementsHow RestoreTrust chooses a sizeConfigure scratch storageOptional namespace quotaFailure behavior

Every restore Job receives its own dynamically provisioned PersistentVolumeClaim (PVC). The volume holds the downloaded backup, its decoded or unpacked contents, and the restored database data.

The PVC is a generic ephemeral volume owned by the restore Pod. Kubernetes removes it with the Pod after RestoreTrust approves cleanup of that execution's terminal evidence.

StorageClass requirements

PropertyRequired behavior
ProvisioningDynamic
Access modeReadWriteOnce
Volume modeFilesystem
Reclaim policyDelete
TopologyWaitForFirstConsumer for zonal or topology-bound storage
PermissionsCSI driver applies fsGroup so non-root containers can write
CapacityAt least one attachable volume per concurrent restore Job
EncryptionAt rest when required by your data policy
Use reclaimPolicy Delete

A StorageClass with Retain leaves the backing disk and restored customer data behind after the PVC is removed. Use a dedicated class with reclaimPolicy: Delete unless your security policy explicitly requires manual retention and cleanup.

How RestoreTrust chooses a size

Every schedule sets its own scratch size in whole GiB, from 1 to 9313 GiB (10 TB). The field is required, and the agent requests exactly that size for each restore of the schedule. The worker has no size settings: its Deployment only chooses the StorageClass.

A schedule saved before the size became required has none. Its checks fail with "schedule has no scratch size" until you set one.

Size each schedule for the largest expected combination of:

  1. the downloaded backup;
  2. the decoded or unpacked dump;
  3. database files created during restore;
  4. temporary working space and growth during validation.

Compressed backup size alone is not a safe estimate. Allow headroom for decompression, database structures, and restore-time amplification.

Configure scratch storage

  1. 1

    Choose a StorageClass

    Select a class that meets the table above. Leaving the field empty uses the cluster's default StorageClass.

    bash
    kubectl get storageclasskubectl get storageclass <STORAGE_CLASS> -o yaml
  2. 2

    Set schedule sizes

    Enter the scratch size when you create a schedule, or change it on the schedule's Project worker page.

  3. 3

    Run a representative restore

    Use a backup near the upper end of your expected size. Monitor the PVC, Pod, and node while the run is active.

    bash
    kubectl -n <JOB_NAMESPACE> get pods,pvckubectl -n <JOB_NAMESPACE> describe pod <RESTORE_POD>kubectl -n <JOB_NAMESPACE> describe pvc <SCRATCH_PVC>

Optional namespace quota

Anyone who can edit a schedule decides how large its PVCs are. A ResourceQuota in the job namespace is the cluster's own limit on the number and total size of temporary PVCs. Set the count to at least Max parallel jobs, and storage to at least:

Max parallel jobs × largest schedule scratch size

For a worker with four parallel Jobs whose largest schedule uses 100 GiB:

yaml
apiVersion: v1kind: ResourceQuotametadata:  name: restoretrust-scratch  namespace: restoretrust-jobs-examplespec:  hard:    persistentvolumeclaims: "4"    requests.storage: "400Gi"

Finished Jobs can briefly continue to count against quota until their result is acknowledged and the Pod is removed. A PVC the quota refuses keeps its Pod Pending until the check fails as insufficient storage. Increase the quota before increasing parallel capacity or a schedule's scratch size.

Failure behavior

SymptomLikely causeAction
Pod remains Pending with an unbound PVCMissing/default StorageClass, quota, topology, or provisioning failureDescribe the Pod and PVC; fix the class, quota, or topology
Pod reports a volume attach limitToo many volumes on the nodeAdd nodes, reduce parallel jobs, or use a driver with suitable limits
Restore reports insufficient scratch storagePVC filled or Pod was evictedIncrease the schedule's scratch size and check node pressure
Pod times out while mountingCSI attach or mount failureInspect Pod events and the CSI driver; RestoreTrust cannot see storage-system events through its restricted RBAC
Disks remain after completed runsRetain, retained Pods, or manual debuggingIdentify ownership before deleting; correct the reclaim policy

Do not retain completed Jobs for routine operation. Retained Jobs keep their Pods, PVCs, and restored data until you delete them manually.

Do not delete active scratch volumes

Deleting a PVC, Pod, or Job during a restore destroys the in-progress workspace and fails the check. Confirm the check is finished and identify the owning Job before manual cleanup.

Related topics

  • Configure a worker
  • Monitor worker health
  • Troubleshoot restore Jobs