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 GZIP="--rsyncable -9"
16 export RSYNC_RSH="ssh -ax -c arcfour"
18 nice tar --create --gzip --dereference --directory=$T --file=$T/$B <%= @name %>-$D
19 nice rsync $T/$B backup::backup