Introducing a new way to review your PRs.

Read the announcement

gotempsh / temps

AI-native open-source alternative to Vercel + Sentry + PostHog + Pingdom + Resend + E2B. 440+ CLI operations with drop-in skills for Claude Code, Codex & OpenCode — deployments, analytics, session replay, error tracking, OpenTelemetry, email, sandboxes & AI gateway in one self-hosted Rust binary.

View on GitHub

25 documents · Updated Oct 21, 2026

docs / backup-and-recovery

Backup and recovery

Backup and recovery protect the data owned by the control plane and its external services. The system connects each backup to a storage source and a schedule, keeps enough identity and integrity data to find it later, and provides restore paths that can rebuild a service, create a recovery copy, or move data to a selected recovery point. This work is part of the wider deployment lifecycle and coordinates with deployment orchestration, projects and environments, project groups and templates, domains and networking, and managed services and data import.

Protection model

The protection model joins four concerns: where data is stored, what data a schedule covers, how long it remains available, and how a restore is checked before it changes a service. These concerns work together so a completed backup is both discoverable and useful for recovery.

Backup sources

An S3 source is the durable destination for backup objects. It can point to Amazon S3 or an S3-compatible store such as RustFS, and it may be operator-configured or managed by Temps Cloud. Source credentials are protected at rest, while the source identity remains stable so schedules and existing backup records continue to point to the same destination during credential rotation.

New or changed sources are checked before they are saved. The check reports whether the problem is DNS, transport, TLS, credentials, bucket access, bucket name, or region. It uses a bounded operation time and does not include credentials in the reported cause, which gives an operator a useful fix without exposing secret data.

Sources also define the boundary for listing and disaster recovery. A source index can show backups recorded by the current instance and can scan for objects left by another instance when the local catalog is missing. The scan recognizes logical dump objects such as PostgreSQL, Redis, MongoDB, and MariaDB artifacts, plus WAL-G completion markers for continuous archives. MongoDB native WAL-G repositories and logical .archive objects therefore remain discoverable after a catalog loss.

The normal source listing reads the local catalog and avoids a storage walk. An optional scan adds objects found in the bucket and marks them as discovered outside the local catalog, so an operator can tell a known backup from one recovered from an earlier instance. The console also keeps a failed source read separate from an empty source list, including when cached rows remain visible. This prevents an access error from looking like lost configuration. Cloud-managed sources are visible for status and testing but are not edited or deleted through the operator flow.

References: crates/…/s3_probe.rs• L26-59 crates/…/s3_probe.rs• L175-253 crates/…/s3_probe.rs• L364-395 crates/…/backup.rs• L159-255 crates/…/backup.rs• L346-408 web/…/S3SourcesManagement.tsx• L215-230 web/…/S3SourcesManagement.tsx• L414-445 web/…/S3SourcesManagement.tsx• L463-603

Backup schedules

Schedules turn a storage source into a repeatable protection policy. A schedule selects a time expression, backup kind, retention period, and target scope. By default it covers all external services and the control plane; it can instead name a smaller set of services and omit the control-plane backup.

The same schedule model supports enabled, disabled, manual, and generated schedules. A manual or scheduled trigger creates one parent run and fans out into one child backup for each selected service plus the control plane when enabled. The system rejects overlapping runs for the same schedule and rejects a target that is also supplying the schedule's backup destination.

New MariaDB services receive a covering daily full-backup schedule when a default S3 source is available. This is a one-time, latched provision step. It does not recreate a schedule that an operator later deletes, and a failed provision attempt is retried on a later reconciliation pass.

References: crates/…/backup_schedules.rs• L10-46 crates/…/backup_handler.rs• L304-337 crates/…/backup.rs• L116-156 crates/…/backup.rs• L1368-1499

Backup records

The backup catalog is the user-facing record of each protected artifact. A record links the artifact to its source and, when applicable, to a schedule and an external service. It carries lifecycle state, location, size, checksum, compression, metadata, and an expiry time. External-service records preserve the service name and type seen at backup time, so restore history stays understandable even after the live service is removed.

Scheduled fan-out keeps a parent run relationship without making the parent record the data itself. The catalog remains the source of truth for whether an artifact is complete and whether it can be used by a restore. A source index can also mark an object as an S3 scan result when it has no local catalog row.

References: crates/…/backups.rs• L8-38 crates/…/external_service_backups.rs• L8-30 crates/…/backup_handler.rs• L456-539 crates/…/backup_handler.rs• L713-783

Operational audit trail

Backup and restore actions produce audit records that connect an operator or request context to the affected source, schedule, artifact, or restore run. The records also preserve outcomes for deletion and retention cleanup, which lets operators distinguish a completed cleanup from a partial one.

Restore audit data records the backup's producer services and whether a cross-service confirmation was supplied. A separate cancellation record captures the target, mode, target name, and phase when a restore is stopped safely. This makes destructive recovery actions and their safe early exits traceable even when the original service no longer exists or the restore uses a raw location.

References: crates/…/restore_handler.rs• L529-579 crates/…/restore_handler.rs• L681-754 crates/…/pg_upgrade_handler.rs• L43-101

Backup execution

Backup execution separates the request to protect data from the engine that knows how to read a given service. The request creates durable records and queue work, the service type selects a suitable engine, and the engine writes an artifact to the configured source while the catalog receives the result.

This diagram shows the normal path from policy to a restorable artifact.

flowchart LR
    A[Schedule or manual request] --> B[Select target services]
    B --> C[Create parent and child records]
    C --> D[Queue backup work]
    D --> E[Select service engine]
    E --> F[Write artifact to S3 source]
    F --> G[Record state, location, size, checksum]
    G --> H[Publish complete recovery set when eligible]
    H --> I[Optional Cloud registration]

Storage engines

Each supported service uses a backup form that matches its data model and recovery needs. Engines prefer direct streaming to the S3 source when the service image supports it. They use a logical or one-shot dump as a fallback when that native path is not available. Common engine rules also provide a uniform metadata companion and choose a single-part or resumable multipart upload based on artifact size.

Service familyProtection formRecovery value
Control planePostgreSQL dump with critical data and schemaRebuilds the control-plane state while leaving high-volume telemetry data to regenerate
PostgreSQLWAL-G archive, cluster-primary archive, or logical dumpContinuous archives support point-in-time recovery; a dump supports a fixed restore point; WAL-G records the current archive position and the compressed size of the selected backup
MariaDBPhysical base with binary logs or logical dumpThe physical path supports point-in-time recovery; a dump supports a fixed restore point
RedisWAL-G RDB stream or service-native RDB snapshotRebuilds the key-value state captured by the snapshot; the native stream supports managed verification
MongoDBWAL-G archive stream or logical mongodump archiveRebuilds databases and collections; the native stream supports managed verification, while the logical fallback remains usable for local recovery
S3-compatible storageObject mirrorRecreates the captured object set, including each visible source bucket

MongoDB uses the credentials defined by the running service when it can inspect that service. Its native path streams the archive to S3 without a database-sized host file. When the image does not provide WAL-G, a one-shot logical dump creates an isolated archive. That fallback is valid for local recovery but does not provide the identity contract needed for managed Cloud restore verification.

The recorded location and engine identity determine the restore strategy. Continuous archive engines pin the service to the source that carries its change stream, so a schedule cannot silently split a base backup from the logs needed for recovery. WAL-G records an exact backup identity and reports the size of the backup just written rather than the whole shared repository.

References: crates/…/postgres_walg.rs• L65-109 crates/…/postgres_walg.rs• L177-211 crates/…/postgres_walg.rs• L286-342 crates/…/mongodb.rs• L78-185 crates/…/mongodb.rs• L194-276 crates/…/v2_common.rs• L156-241

One-shot dump capture

Logical dump work runs in a short-lived container when the service does not provide a native stream. The container writes into its own attempt-specific storage. Temps then copies the result through the Docker API and removes the container, so the flow works when Docker runs in a VM or on another host.

Each attempt has its own container name, container path, host directory, and cleanup boundary. Temps rejects a command that fails, a result that cannot be read, or an empty dump. It keeps only bounded diagnostic output and preserves the retry policy for upload and stream failures.

References: crates/…/dump_capture.rs• L4-35 crates/…/dump_capture.rs• L56-155 crates/…/dump_capture.rs• L225-337 crates/…/dump_capture.rs• L388-418

PostgreSQL continuous archives

PostgreSQL WAL-G backups protect both a base state and the change stream needed to reach later points. Before the base is taken, the service enables and verifies continuous archiving. The backup records an archive position and an exact identity so the base and its WAL history remain recoverable and independently manageable.

The engine sends the base directly from the running database container to the selected source. It writes a companion record with the archive position and backup size. Database credentials travel as execution inputs rather than as shell command text, so a password cannot become a command.

If archiving is off, enabling it may recreate the PostgreSQL container. A manual request must confirm this restart after preflight; the engine refuses an unconfirmed restart and verifies that the original cluster data is still present before it takes the base backup. This keeps a successful result tied to a known, recoverable cluster rather than to a newly initialized container.

References: crates/…/postgres_walg.rs• L176-261 crates/…/postgres_walg.rs• L263-380 crates/…/postgres_walg.rs• L399-425 crates/…/postgres_walg.rs• L461-519 crates/…/v2_common.rs• L345-429

Control-plane protection

The control-plane backup protects the records needed to bring the Temps instance back, while keeping high-volume observability and analytics rows out of the data copy. It still keeps the schema for every table so the restored database has the expected structure.

The excluded data set is closed over foreign-key dependents at backup time. This prevents a kept table from referring to rows that the backup intentionally omits. TimescaleDB chunk data follows the same exclusion boundary, while aggregate history remains available when it is small enough to support dashboards after recovery.

Each attempt uses a new backup identity. A failed attempt can therefore leave an unusable remote fragment without colliding with the next attempt, while only a non-empty uploaded dump is recorded as the result.

References: crates/…/dump_capture.rs• L225-230 crates/…/dump_capture.rs• L329-418 crates/…/v2_common.rs• L640-691

Execution state

The execution path records progress separately from the final backup record. A queued job can be claimed by a worker, retried after a transient failure, and resumed from durable progress when the worker stops. This keeps slow or failed work from blocking other scheduled work and gives operators a current step instead of only a final success or failure.

The public catalog reports the artifact's final state. Execution details explain how the result was reached and allow a schedule run to report whether its children are pending, running, completed, or failed. On startup, records left in an in-flight state by a previous process are marked failed, so the catalog does not present dead work as active work.

Manual service backups use the same asynchronous path as scheduled work. A PostgreSQL preflight reports when the backup must restart the database to enable WAL archiving; the request then needs explicit restart confirmation before any backup rows or job work are started. Scheduled work can apply the restart policy without an interactive caller.

References: crates/…/backup.rs• L142-156 crates/…/backup.rs• L1285-1343 crates/…/backup.rs• L2195-2421 crates/…/backup_handler.rs• L3142-3309 crates/…/backup_handler.rs• L3312-3371 crates/…/backup_handler.rs• L666-710

Recovery sets

A recovery set is the complete instance snapshot produced by a successful scheduled run that includes the control plane. The system waits until every child is complete, checks that the recorded service coverage matches the control plane's expected coverage, then writes an authenticated manifest that groups the control-plane artifact with the external-service artifacts.

This gives disaster recovery one durable object to discover and verify. The manifest protects the saved server configuration and records the source and artifact details needed to rebuild the instance. Publication is safe to retry, and a background reconciliation pass can publish a set when a process restart or lost event interrupts the normal completion signal.

References: crates/…/backup.rs• L1607-1634 crates/…/backup.rs• L1796-2157 crates/…/mod.rs• L18-25

Upgrade protection

An upgrade protection snapshot gives the control plane a local rollback point before forward-only schema migrations run. It is created only when an existing database has pending migrations. A fresh install and a restart with no pending migrations do not create one.

The snapshot contains a restorable PostgreSQL archive and a manifest that identifies the release and migrations it precedes. It follows the control-plane data boundary, keeps the schema for all tables, excludes high-volume telemetry rows from the data copy, and keeps the newest three snapshots. PostgreSQL major-version upgrade records link the pre-upgrade backup to the temporary rollback volume. A completed upgrade can be rolled back only while that volume remains within its retention window, and rollback requires sensitive-action confirmation.

References: crates/…/pg_upgrade_handler.rs• L103-155 crates/…/pg_upgrade_handler.rs• L419-480

Retention and storage lifecycle

Retention limits how long scheduled artifacts remain available. The schedule's retention period is copied to each scheduled backup as an expiry time, so the catalog can show the deadline even if the schedule changes later. Manual backups and records without a positive retention period remain until an operator deletes them.

Operators can preview the candidates before cleanup. A confirmed cleanup is bound to the exact candidate IDs from that preview and is rejected if the policy, schedule membership, or expiry state changed. Cleanup removes only eligible terminal backups, marks deletion before remote work, validates that each remote path belongs to the backup, and reports complete or partial deletion.

The storage lifecycle service also aligns provider-side lifecycle rules with the active schedules. New backup objects carry managed and retention tags when the provider supports them. The application remains the source of truth when a provider does not support tagging or lifecycle rules. Large uploads retry individual parts and abort incomplete uploads when the operation gives up; provider lifecycle rules remain the fallback for parts left by a process crash.

References: crates/…/backup.rs• L561-611 crates/…/backup.rs• L1075-1083 crates/…/v2_common.rs• L160-185 crates/…/v2_common.rs• L243-318 crates/…/v2_common.rs• L865-945

Managed backup coordination

Temps Cloud can provision a managed S3 destination for an enrolled instance. The destination alone does not create protection; the backup system must have a schedule that points to it. The Cloud and backup services cross this boundary through a shared schedule contract so enrollment can create one ordinary, visible schedule without making either service depend directly on the other.

The default managed schedule runs nightly at 02:00, covers every service and the control plane, and uses retention supplied by the Cloud plan. Operators can change or remove it like any other schedule. When the Cloud link is removed, schedules targeting the managed destination are stopped before its credential is revoked. The generated schedule is removed, while operator-created schedules are disabled so their configuration is preserved.

Services with continuous archives pinned to another source are reported as conflicts rather than silently moved. An operator must repoint the archive or use a schedule that matches its existing source.

References: crates/…/managed_backup_schedule.rs• L4-13 crates/…/managed_backup_schedule.rs• L21-33 crates/…/managed_backup_schedule.rs• L84-125 docs/…/044-cloud-managed-backup-default-schedule.md• L45-113

Cloud backup mirror

The Cloud mirror registers completed local backups that use a Cloud-managed source. It discovers new and previously incomplete artifacts, sends the required snapshot information and objects to Cloud, and keeps local backup completion authoritative when Cloud is unavailable. Per-backup progress and bounded retries allow a later sweep to continue without restarting all object transfers.

Native streams for PostgreSQL, Redis, and MongoDB carry the identity needed for managed restore verification. Logical fallback backups remain usable for local recovery, but they do not provide that managed verification contract. Operator-owned sources are not mirrored because their storage and cost choices remain local.

The mirror does not treat a missing Cloud link as a local backup failure. A later reconciliation can register an artifact after the link returns.

References: crates/…/backup_mirror.rs• L37-65 crates/…/backup_mirror.rs• L265-417 crates/…/mongodb.rs• L165-185 crates/…/mongodb.rs• L327-466

Restore workflows

Restore is an asynchronous, recorded operation. The system first plans the action, checks the backup and target, then creates a restore run that reports status and phase while an engine performs the work. A restore may use a catalog backup ID or a raw location discovered in an S3 source, which supports recovery when the original instance's catalog is not available.

This diagram shows the safety boundary between planning and data mutation.

flowchart TD
    A[Select catalog backup or source location] --> B[Plan restore]
    B --> C{Engine and format valid?}
    C -- No --> D[Return validation errors]
    C -- Yes --> E[Authorize source and target]
    E --> F{Destructive target?}
    F -- Yes --> G[Require sensitive-action confirmation]
    F -- No --> H[Start restore run]
    G --> H
    H --> I[Prepare or provision target]
    I --> J[Restore and recover]
    J --> K[Verify and record result]

Restore modes

The target service determines which restore capabilities are available. In-place restore replaces the data in an existing service. New-service restore creates an isolated service that can be checked before traffic moves. Point-in-time recovery restores a continuous archive to a time or other recovery target when the selected backup format supports it.

The planner checks engine compatibility and identifies warnings such as cross-service data movement or source credentials that may be carried by restored data. It distinguishes physical MariaDB bases from logical dumps and blocks point-in-time recovery when the selected artifact cannot replay a continuous change stream. For a catalog backup with a known start time, it also rejects a time target before that backup began. S3-compatible object stores share a restore family when the target supports the same object-copy path. MongoDB WAL-G repositories and logical archives use different recovery contracts, so a logical archive can support local restore without claiming managed stream verification.

References: crates/…/restore.rs• L472-526 crates/…/restore.rs• L591-800 crates/…/restore.rs• L1607-1721 crates/…/mongodb.rs• L49-58

Restore authorization

Restore authorization protects both ends of the data copy. The caller must have access to the backup source and to the target service, even when the backup came from a different service. In-place and point-in-time restores that write into an existing service require an extra sensitive-action confirmation; creating a new service uses the create boundary instead.

A destructive restore onto a service that did not produce the backup also requires explicit cross-service confirmation. The same rule applies when the origin is unknown, such as a raw S3 location. In a project-scoped deployment, raw-location and ownerless restores are restricted to administrators because they do not have a project-owned service identity that can be checked. Restore history applies the same source-and-target boundary, so a caller does not see runs whose producer or clone target is outside its access scope.

Restore history is retained as a run record. It includes the source, target when one is created, mode, phase, status, error, cancellation state, and resume information. A backup cannot be deleted while restore history still refers to it, and deletion cannot race a new restore because both operations protect the source record.

References: crates/…/restore_handler.rs• L376-475 crates/…/restore_handler.rs• L452-510 crates/…/restore_handler.rs• L612-664 crates/…/restore.rs• L1079-1331 crates/…/restore.rs• L1463-1479

Restore verification

Completion means more than finding an object in storage. The target must start with the restored data and provide engine-level evidence that the result is usable. The restore run moves through preparation, restore or recovery, and verification before it is marked complete.

The safe default is a new isolated service; an in-place restore needs a clear write fence, a recent safety backup, rollback rules, and an accepted downtime plan before execution. Cross-service restores also account for credentials carried by the data. PostgreSQL, MongoDB, and physical MariaDB restores can replace the target's authentication state, so the system keeps target configuration aligned with the restored service identity when the engine replaces its authentication data.

References: crates/…/restore.rs• L835-899 crates/…/restore.rs• L1723-1765 crates/…/restore_handler.rs• L492-579

Restore cancellation

Cancellation is a recorded request with a narrow safety boundary. The database row decides whether the request wins the race with the worker, while an in-process signal only wakes a worker sooner. For an in-place restore, cancellation is accepted during preparation or download and refused after the worker enters the write phase. For a new-service restore, it remains available through provisioning and recovery until the new service is registered.

Before a new service is provisioned, its name must be free of another active restore and of existing container or volume resources. When cancellation wins before target writes, the target remains unchanged. A cancelled new-service restore removes the unregistered container and volume, then checks that no objects remain. If cleanup cannot be confirmed, the run reports the leftover service resources instead of claiming a clean result. Cancellation is recorded in the audit trail with the phase and target context.

References: crates/…/restore.rs• L1334-1378 crates/…/restore_cancel.rs• L42-69 crates/…/restore_cancel.rs• L207-271 crates/…/restore_cancel.rs• L441-571

Restore restart reconciliation

Startup reconciliation handles restore runs whose worker ended with an earlier Temps process. At boot it fences helper work that may still write to the target before it marks the run interrupted. The run keeps its last phase and tells the operator that the data may be partial. If fencing fails, the run stays active and is retried so a new restore cannot race a surviving helper. This process does not replay or roll back the data.

References: crates/…/mod.rs• L34-38 crates/…/restore_handler.rs• L595-609

MariaDB point-in-time recovery

MariaDB point-in-time recovery combines a physical base backup with archived binary logs. The base gives recovery a starting state, while the archived logs let the restore advance to a selected time. The end-to-end flow restores into a new service and verifies that data before the target time is present while later data is absent.

Retention follows the same reachability rule. It removes only log segments older than the oldest retained base anchor, keeps the anchor segment and later segments, and does not move the shipped-log marker backward. This preserves both the current recovery range and the next archive point.

References: crates/…/mariadb_pitr_e2e.rs• L1-31 crates/…/mariadb_pitr_e2e.rs• L792-990 crates/…/mariadb_pitr_e2e.rs• L1294-1314 crates/…/mariadb_pitr_e2e.rs• L1499-1585

Upgrade rollback

PostgreSQL major-version upgrades use backup protection before the service changes version. The upgrade record keeps the pre-upgrade backup identity and the temporary rollback volume, so an operator can return a completed upgrade to its prior data volume and image while the rollback retention window remains open.

Rollback is a destructive service change. The request is scoped to the service, requires write access and sensitive-action confirmation, and fails after the rollback volume is swept or its retention period expires. Upgrade state and logs remain available for review, retry, cancellation, and audit.

References: crates/…/pg_upgrade_handler.rs• L419-480 crates/…/pg_upgrade_handler.rs• L531-559

Change checklist

When these files or sections are changed, remember to consider these:

  • Changes to source identity or credential handling must preserve the source ID used by schedules and existing backup locations.
  • Changes to S3 probing must keep endpoint normalization, timeout limits, failure classification, and secret-free error details aligned with source creation and update behavior.
  • Changes to schedule scope must keep parent schedule runs, child service records, control-plane inclusion, expected recovery-set coverage, and manual triggers aligned.
  • Changes to backup location or format classification must update both source scanning and restore strategy selection, especially for MariaDB physical versus logical backups and MongoDB WAL-G versus logical archives.
  • Changes to engine selection must keep backup dispatch, Cloud mirror eligibility, and restore capability checks consistent.
  • Changes to continuous archive engines must keep the base backup, source pin, change-log archive, and point-in-time restore anchor on the same source.
  • Changes to WAL-G output or identity metadata must keep per-backup size lookup, source discovery, restore selection, managed registration, and safe deletion aligned.
  • Changes to dump capture or one-shot container lifetime must keep attempt isolation, Docker archive readback, cancellation, sidecar cleanup, and error classification aligned.
  • Changes to upload size, retry, checksum, or tagging behavior must keep single-part and multipart uploads compatible with AWS and S3-compatible providers.
  • Changes to retention must keep catalog expiry, preview-bound cleanup, remote deletion safety, object tags, and provider lifecycle rules consistent.
  • Changes to restore modes must preserve checks on both the backup source and the target service before any data mutation.
  • Changes to restore authorization or audit payloads must keep source ownership, target access, cross-service confirmation, and actor context aligned.
  • Changes to restore phases, cancellation, or worker ownership must keep the conditional database race, safe pre-write boundary, new-service name claim, cleanup confirmation, and interrupted-run handling aligned.
  • Changes to PostgreSQL archive setup or manual backup preflight must keep restart detection, caller confirmation, scheduled-run behavior, and same-cluster verification aligned.
  • Changes to MariaDB physical backup or binlog pruning must preserve the base anchor, archived-log range, and no-rewind rule for the shipped-log marker.
  • Changes to PostgreSQL upgrade routes must keep service ownership checks, pre-upgrade backup links, rollback volume retention, and sensitive-action confirmation connected.
  • Changes to source-list APIs or source-management UI must keep catalog-only results, optional S3 discovery, managed-source restrictions, cached read failures, and empty states distinct.

Important failure modes

TriggerConsequenceGuard
An S3 source cannot resolve, connect, authenticate, or access its bucketSource creation or backup work stops with a classified errorProbe the destination before saving it and show a bounded, secret-free cause
Docker runs on a different host or VM and a dump relies on a shared host pathThe command may succeed but the backup file cannot be readKeep dump output in the container and copy it through the Docker API
A retry reuses a shared dump path or container nameA stale or concurrent attempt can block or corrupt the new dumpGive every attempt its own identity and cleanup boundary
A dump command exits successfully but produces no readable bytesAn empty or partial artifact could be recorded as completeRequire successful Docker readback and a non-empty result
MongoDB has no WAL-G support in its imageThe backup cannot satisfy managed Cloud restore verificationUse the logical archive only as a local-recovery fallback and report its limited eligibility
WAL-G archiving is enabled after the base backupThe base may not have the WAL needed to start recoveryEnable and verify continuous archiving before taking the base
A continuous archive service uses a different S3 source from its base backupThe base and change stream do not form one recoverable historyPreserve the source pin and reject the mismatch
S3 rejects a transient upload part or completion requestA large backup fails or restarts from zeroRetry individual parts and retain accepted parts until completion or abort
An S3 provider does not support object tags or lifecycle rulesProvider-side expiry is unavailableKeep application-side retention authoritative and reconcile supported rules later
A schedule run has a missing or failed child backupThe run cannot become a complete instance recovery setRequire all expected children and matching service coverage before publication
A MariaDB PITR uses a logical dump or prunes through the oldest base anchorThe selected time cannot be reached or retained data becomes unusableRequire a physical base and prune only segments strictly older than its anchor
A restore source and target use incompatible enginesThe restore cannot safely interpret the artifactValidate engine compatibility during planning and start
A destructive cross-service restore lacks explicit confirmationExisting target data is protected from an unexpected overwriteRequire source access, target access, and cross-service confirmation
A manual PostgreSQL backup would restart the database without confirmationThe request is refused before it creates backup workRun preflight and require confirm_restart=true when archiving must be enabled
PostgreSQL archiving setup recreates the wrong or empty containerThe backup could report success for data that is not the original clusterVerify the restored container has the same cluster identity and data before backup-push
The source list request fails but the console treats it as an empty listAn operator may add or change storage while the real source state is unknownShow the read failure and offer retry instead of showing the empty state
A new-service restore uses a name held by another run or leftover Docker resourcesCancellation or cleanup could affect data that this run did not createCheck active restore names and Docker resources before provisioning
Temps restarts while a restore helper may still writeA second restore can race a partial first restoreFence surviving helpers before marking the run interrupted
PostgreSQL rollback starts after its rollback volume expiresThe old data volume is gone or no longer eligibleKeep the upgrade record's retention state authoritative and reject late rollback

Key files

FileWhy to read it
crates/…/backup.rsMain service for source checks, schedule runs, source scans, recovery-set publication, retention, and deletion safety
crates/…/backup_handler.rsAPI contract for sources, schedules, backup records, cleanup, service targeting, and restart-aware manual runs
crates/…/s3_probe.rsS3 destination reachability checks and operator-facing failure classes
crates/…/v2_common.rsShared S3 client, integrity, metadata, tagging, and resumable upload behavior
crates/…/dump_capture.rsAttempt-scoped logical dump capture through Docker
crates/…/postgres_walg.rsPostgreSQL continuous archive protection, restart safety, and recovery identity
crates/…/mongodb.rsMongoDB native WAL-G streaming, logical fallback capture, and managed-restore eligibility
crates/…/restore.rsRestore selection, planning, modes, engine checks, and asynchronous runs
crates/…/restore_cancel.rsSafe cancellation phases, write fencing, new-service name checks, and cleanup confirmation
crates/…/restore_handler.rsRestore API, source and target authorization, planning, cancellation, and audit context
crates/…/pg_upgrade_handler.rsPostgreSQL upgrade records, pre-upgrade backup links, rollback access, and audit scope
crates/…/mariadb_pitr_e2e.rsReal MariaDB base backup, binary-log recovery, and retention behavior
crates/…/mod.rsPublic service boundary for restore, lifecycle, and reconciliation coordination
crates/…/managed_backup_schedule.rsContract between Cloud enrollment and backup schedule management
crates/…/backup_mirror.rsRegistration of local Cloud-managed backups and resumable transfer
web/…/S3SourcesManagement.tsxOperator view for source status, connection checks, manual runs, defaults, and managed-source limits
docs/deployment-lifecycle.mdParent page for how backup and recovery fit into the hosted workload lifecycle
docs/deployment-orchestration.mdRelated page for deployment state and provider coordination around services
docs/projects-and-environments.mdRelated page for project and environment boundaries that shape service access
docs/project-groups-and-templates.mdRelated page for shared project and environment structure
docs/domains-and-networking.mdRelated page for network paths used by services and storage endpoints
docs/managed-services-and-data-import.mdRelated page for managed service ownership and data movement boundaries