Download the PHP package vortos/vortos-backup without Composer
On this page you can find all versions of the php package vortos/vortos-backup. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vortos/vortos-backup
More information about vortos/vortos-backup
Files in vortos/vortos-backup
Package vortos-backup
Short Description Vortos Backup — enterprise-grade database backups: streamed pg_dump/pg_basebackup + WAL PITR and mongodump to an object store (R2), integrity-verified at creation, append-only catalog, GFS retention with hard safety floors, encryption-ready stream seam (Block 20), and a Block-17-ready alerting event seam. Built on the OpsKit driver pattern.
License MIT
Informations about the package vortos-backup
vortos/vortos-backup
Enterprise-grade database backups for the Vortos platform (Deploy/CI-CD Block 19).
dump → store → verify → catalog → retain, versioned and scheduled, behind the
OpsKit swappable-driver pattern. The reference stack backs up Postgres + Mongo to
Cloudflare R2 via the existing object store — but no provider name appears outside a
Driver/ namespace.
Concerns (two ports)
| Port | Drivers (in-core) | Selected by |
|---|---|---|
Port\BackupTargetInterface (dump source) |
postgres, mongo |
#[AsDriver] key |
Port\BackupStoreInterface (destination) |
object-store |
#[AsDriver] key |
Both extend OpsKit\DriverInterface, so every driver reports a CapabilityDescriptor
validated at config time and asserted by the TCK (Testing\*ConformanceTestCase).
Guarantees
- Streamed, bounded memory. Dumps flow process → store via multipart; the checksum
is computed in the same pass (
Service\ChecksumStreamFilter). No whole-artifact buffering; no plaintext dump on a tracked/persistent disk path. - Verified at creation.
Service\IntegrityVerifierreads the stored object back, re-checks the checksum (constant-time) and sniffs the format magic. A corrupt or truncated dump fails loudly and is never cataloged as good. A mid-stream subprocess failure is caught byService\Process\ProcessGuardafter the bytes are consumed. - Append-only catalog.
Catalog\Dbal*INSERTs once; a DB trigger rejects UPDATE (DELETE is permitted only for retention). - Safe retention.
Domain\RetentionPolicyis GFS with a hardminKeepFloorand a "never delete the most-recent" guard; dry-run is the default (backup:retention),--applyrequired to delete. WAL is pruned by the PITR invariant (kept iff ≥ the oldest retained base backup). - Full PITR.
pg_basebackupbase backups + WAL shipping (Pitr\PostgresWalArchiver, idempotent).Pitr\PitrPreflightfails closed when the host isn't configured.
Block boundaries
- Block 17 (
vortos-alerts) — not required. Backup events broadcast onEvent\BackupEventSinkInterface(logging default). A failed/integrity-failed backup is aCriticalevent; Block 17 registers an alerting sink via thevortos.backup.event_sinktag — zero changes here. - Block 20 (encryption/3-2-1/object-lock/drills) — additive. At-rest envelope
encryption slots into
Service\EncryptionSeam\StreamTransformInterface(today an identity transform); immutability/cross-region are already declared store capabilities (honestlyfalsefor now).
Host wiring (operator)
- Schedule:
backup:scheduleemits a managed cron fragment that invokesbackup:run. The framework runs no scheduler. - PITR: set
archive_mode=on,wal_level=replica, andarchive_command = 'vortos backup:wal-archive %p --env=prod'on the host. Verify withPitr\PitrPreflight.
Environment
| Var | Default | Purpose |
|---|---|---|
VORTOS_BACKUP_STORE |
object-store |
store driver key |
VORTOS_BACKUP_KEY_PREFIX |
backups |
object key prefix |
VORTOS_BACKUP_LOCK_DIR |
<project>/var/backup-locks |
single-flight locks |
VORTOS_BACKUP_MONGO_URI |
(empty) | mongodump --uri |
pgBackRest (physical backups and the WAL archive)
config/backup.php declares the repository and its schedules; the repository itself (bucket, cipher,
retention, compression) is pgBackRest's own configuration, baked into the database image.
- pgBackRest runs inside the database container; the backup node drives it with Docker exec through
the least-privilege proxy (
VORTOS_BACKUP_DRILL_DOCKER_HOST) and never holds the repository credential. Exec is detached and polled, so no proxy idle timeout can cut a long backup. - Expiry is pgBackRest's own, run at the end of every backup — there is no retention schedule.
- The drill starts a disposable container from the database's own image, mounts the credential
read-only, restores as the server user with
archive_mode=off(a promoted drill never pushes a timeline into the production repository), waits for promotion, then runs the same invariants as every drill pluswal_replayed, which must reach the newest segment archived when the drill began. - The
pgbackrest-repositoryprobe (Monitoring) pages when the repository is unreadable or not ok, when the newest backup or full is older than its schedule allows, or when the server reports segments archived that the repository never stored (archive-push-queue-maxoverflow). - The recovery-time projection anchors on the newest pgBackRest backup when pgBackRest is declared.
- Operator:
backup:pgbackrest status|info|check|backup --type=full|diff|verify|drill. - Cutover. Remove the framework
physical_basebackup and drill from the schedule, ship the image with pgBackRest as the onlyarchive_command, thenbackup:pitr:retire(dry run) and--apply: it deletes every framework base backup and WAL segment, store and catalog, and refuses while either is still scheduled, while the repository is not healthy, or when the newest point-in-time drill did not restore. Logical dumps are untouched. Thewal-efficiencyprobe passes as not-in-use once no base is scheduled.
All versions of vortos-backup with dependencies
ext-hash Version *
psr/clock Version ^1.0
psr/log Version ^3.0
doctrine/dbal Version ^4.0
vortos/vortos-foundation Version ^1.0
vortos/vortos-ops-kit Version ^1.0
vortos/vortos-object-store Version ^1.0
symfony/dependency-injection Version ^7.3
symfony/console Version ^7.3