]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/db/templates/default/backup-db.erb
Use backport of cgi-mapserver
[chef.git] / cookbooks / db / templates / default / backup-db.erb
index 3ad1020c4d7dfba5a98abaaf178df19e61292186..573f31a5edd7a60d7f993c04ae2be7dcc9eca525 100644 (file)
@@ -1,12 +1,11 @@
-#!/bin/sh
+#!/bin/sh -e
 
 # DO NOT EDIT - This file is being maintained by Chef
 
 D=`date +%Y-%m-%d`
-F=/tmp/osm-${D}.dmp
+F=/store/backup/osm-${D}.dmp
 
-pg_dump --user=backup --format=custom --file=$F openstreetmap
-
-rsync $F backup.openstreetmap.org::backup
+pg_dump --user=backup --format=custom --file=$F openstreetmap && \
+  rsync $F backup.openstreetmap.org::backup
 
 rm -f $F