3 # DO NOT EDIT - This file is being maintained by Chef
5 T=$(mktemp -d -t -p /var/tmp osm-blog-staging.XXXXXXXXXX)
7 B=osm-blog-staging-$D.tar.gz
9 mkdir $T/osm-blog-staging-$D
10 echo '[mysqldump]' > $T/mysqldump.opts
11 echo 'user=osm-blog-staging-user' >> $T/mysqldump.opts
12 echo 'password=<%= @passwords["osm-blog-staging-user"] %>' >> $T/mysqldump.opts
13 mysqldump --defaults-file=$T/mysqldump.opts --opt --no-tablespaces osm-blog-staging > $T/osm-blog-staging-$D/osm-blog-staging.sql
14 ln -s /srv/staging.blog.openstreetmap.org $T/osm-blog-staging-$D/www
16 export RSYNC_RSH="ssh -ax"
18 nice tar --create --dereference --directory=$T --warning=no-file-changed osm-blog-staging-$D | nice gzip --rsyncable -9 > $T/$B
19 nice rsync --preallocate --fuzzy $T/$B backup::backup