diff --git a/config/environments.yml b/config/environments.yml new file mode 100644 index 0000000..96ecc98 --- /dev/null +++ b/config/environments.yml @@ -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 diff --git a/scripts/db-backup.sh b/scripts/db-backup.sh new file mode 100755 index 0000000..ca6f465 --- /dev/null +++ b/scripts/db-backup.sh @@ -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."