Commit 0743d5eb authored by Marco Mariani's avatar Marco Mariani

abialian: postgres-restore does not fallback to var/backup

but requires an explicit path.
parent f4479fc5
......@@ -151,8 +151,11 @@ template = inline:
#!/bin/bash
. {{environment}}
# shut down postgres
backup_dir={{backup_dir}}
[ -n "$1" ] && backup_dir="$1"
if [ ! -d "$1" ]; then
echo "Usage: postgres-restore [directory]"
exit 10
fi
backup_dir="$1"
$${directories:bin}/postgres-stop
# check that postgres is down or refuse to run
$${directories:bin}/postgres-status | grep STOPPED || exit 10
......
......@@ -266,7 +266,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-postgres.cfg.in
output = ${buildout:directory}/instance-postgres.cfg
md5sum = e2bcc3dafdfc5bf331b743952ed98be2
md5sum = a138dad1b1da2e3f1e6012f4baf69a9d
mode = 0644
[instance-redis]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment