Add db-backup script and environment config
This commit is contained in:
parent
e0583c38fb
commit
24c7397d96
2 changed files with 28 additions and 0 deletions
13
config/environments.yml
Normal file
13
config/environments.yml
Normal 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
15
scripts/db-backup.sh
Executable 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."
|
||||
Loading…
Reference in a new issue