home · contact · privacy
Fix.
authorChristian Heller <c.heller@plomlompom.de>
Fri, 14 Feb 2020 23:14:41 +0000 (00:14 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Fri, 14 Feb 2020 23:14:41 +0000 (00:14 +0100)
buster/setup_scripts/backup_app.sh

index e3f22e43f70bed78f519f9d0cda6193d325f339b..1c8e580b38de7d266b0d3b6f9c0f7c9ad9977dfc 100755 (executable)
@@ -12,11 +12,11 @@ db_name="$2"
 shift 2
 
 cd /tmp
-rm -rf "/tmp/${app}_backup"
+rm -rf "${app}_backup"
 
 service "${app}" stop
 
-su postgres -lc "pg_dump -d ${db_name} --format=custom -f ${app}_backup/pgdump"
+su postgres -lc "pg_dump -d ${db_name} --format=custom -f ${app}_backup/${db_name}.pgdump"
 for target in "$@"; do
     cp -a "${target}" "${app}_backup${target}"
 done