Skip to content

Feature/grupo tractor 55#194

Open
viktorKhan wants to merge 2 commits into
mainfrom
feature/grupo-tractor-55
Open

Feature/grupo tractor 55#194
viktorKhan wants to merge 2 commits into
mainfrom
feature/grupo-tractor-55

Conversation

@viktorKhan

Copy link
Copy Markdown
Contributor

No description provided.

viktorKhan and others added 2 commits July 9, 2026 12:33
Add the deploy/backup/ foundation for the Backup/DR epic (Phase 1):

- lib/guard.sh: sourced guard_mountpoint helper that fail-closed aborts
  unless the backup drive is actually mounted. This cross-cutting safety
  invariant is sourced by every later backup/DR script.
- README.md: what the engine does, artifact layout, config, how to run,
  and the no-docker-cp streaming rationale.
- DECISIONS.md: locked decisions (restic in Phase 2, whole-cluster
  pg_dumpall, whole-instance influxd -portable, RPO/RTO 24h, ext4 drive
  under root LUKS) and the Step-0 facts (luzgres is the superuser role,
  not a legacy DB; container names; net-new /media/data mount).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…DB dumps

deploy/backup/backup.sh produces application-consistent, un-anonymized
dumps of both databases onto the external backup drive:

- Guards $BACKUP_MOUNT with guard_mountpoint before writing anything.
- Stages under a <UTC-timestamp>.partial dir, renamed to the final name
  only after every step succeeds (atomic completion).
- PostgreSQL: whole-cluster pg_dumpall (plain SQL) streamed to
  postgres/cluster.sql via docker exec (no docker cp).
- InfluxDB 1.8: influxd backup -portable of the whole instance (all DBs +
  metastore, no -host/-database/creds) streamed out via docker exec tar.
- Writes manifest.json with tool versions, the Postgres DB list, byte
  sizes and a SHA-256 per artifact.

deploy/backup/backup.env holds the parameters (BACKUP_MOUNT=/media/data,
PG_CONTAINER, PG_SUPERUSER=luzgres, INFLUX_CONTAINER); an explicit
BACKUP_MOUNT from the environment overrides it.

Verified end-to-end against the running stack: both dumps produced, the
InfluxDB portable backup succeeds without credentials, all 67 manifest
checksums validate with sha256sum -c, and re-runs yield independent
timestamped directories.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant