Add db-backup script and environment config

This commit is contained in:
Anna Schulz 2026-02-03 14:00:00 +00:00
parent e0583c38fb
commit 24c7397d96
2 changed files with 28 additions and 0 deletions

13
config/environments.yml Normal file
View file

@ -0,0 +1,13 @@
environments:
dev:
host: dev.nexus.local
replicas: 1
log_level: debug
staging:
host: staging.nexus.local
replicas: 2
log_level: info
prod:
host: prod.nexus.local
replicas: 5
log_level: warn

15
scripts/db-backup.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/bash
# Trigger a manual snapshot of the production RDS instance.
set -euo pipefail
INSTANCE="nexus-prod-postgres"
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
SNAP_ID="manual-$TIMESTAMP"
echo "[backup] Creating snapshot: $SNAP_ID"
aws rds create-db-snapshot \
--db-instance-identifier "$INSTANCE" \
--db-snapshot-identifier "$SNAP_ID" \
--region eu-central-1
echo "[backup] Snapshot requested. Use 'aws rds describe-db-snapshots' to check status."