3 # DO NOT EDIT - This file is being maintained by Chef
5 T=$(mktemp -d -t -p /var/tmp osqa.XXXXXXXXXX)
7 B=<%= @name %>-$D.tar.gz
9 mkdir $T/<%= @name %>-$D
11 chown <%= @user %> $T/osqa-$D
12 sudo -u <%= @user %> pg_dump --format=custom --file=$T/<%= @name %>-$D/osqa.dmp <%= @database %>
13 ln -s <%= @directory %>/upfiles $T/<%= @name %>-$D/upfiles
15 export RSYNC_RSH="ssh -ax"
17 nice tar --create --dereference --directory=$T <%= @name %>-$D | nice gzip --rsyncable -9 > $T/$B
18 nice rsync --preallocate --fuzzy $T/$B backup.openstreetmap.org::backup