-#!/bin/sh
+#!/bin/sh -e
# DO NOT EDIT - This file is being maintained by Chef
D=`date +%Y-%m-%d`
F=/store/backup/osm-${D}.dmp
-pg_dump --user=backup --format=custom --file=$F openstreetmap
-
-export RSYNC_RSH="ssh -ax"
-rsync $F backup.openstreetmap.org::backup
+pg_dump --user=backup --format=custom --file=$F openstreetmap && \
+ rsync $F backup.openstreetmap.org::backup
rm -f $F