Unzip budget-app v7 into repo root
This commit is contained in:
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
# Usage (from the project folder): docker compose exec backup restore.sh /backups/budget_YYYYMMDD_HHMMSS.sql.gz
|
||||
set -eu
|
||||
file="${1:?give the backup file, e.g. /backups/budget_20270101_023000.sql.gz}"
|
||||
echo "Restoring $file into database $PGDATABASE ..."
|
||||
gunzip -c "$file" | psql -q -v ON_ERROR_STOP=1
|
||||
echo "Done. Restart the api container: docker compose restart api"
|
||||
Reference in New Issue
Block a user