LifeMate — Personal, Family & Learning Companion
ops: add PostgreSQL restore command
davoodmehraban89 committed
Oct 5, 2026 at 17:11 UTC
923b57dfdd9d9a6cb17dbdcc0d0153ff0479e779
1 file changed
+5
backend/scripts/restore.sh
new
+5
@@ -0,0 +1,5 @@
1
+#!/usr/bin/env bash
2
+set -euo pipefail
3
+: "${DATABASE_URL:?DATABASE_URL is required}"
4
+dump="${1:?dump file is required}"
5
+pg_restore --dbname="$DATABASE_URL" --clean --if-exists --no-owner --no-privileges --exit-on-error "$dump"