3 T=$(mktemp -d -t -p /var/tmp chef-server.XXXXXXXXXX)
5 B=chef-server-$D.tar.gz
7 mkdir $T/chef-server-$D
8 chgrp opscode-pgsql $T $T/chef-server-$D
9 chmod g+rwx $T $T/chef-server-$D
10 sudo -u opscode-pgsql /opt/opscode/embedded/bin/pg_dumpall --file=$T/chef-server-$D/chef.dmp --clean
11 ln -s /var/opt/opscode/bookshelf/data $T/chef-server-$D/bookshelf
13 export GZIP="--rsyncable -9"
15 nice tar --create --gzip --dereference --directory=$T --file=$T/$B chef-server-$D
16 nice rsync $T/$B backup::backup