]> git.openstreetmap.org Git - chef.git/blob - cookbooks/thinkup/templates/default/backup.cron.erb
Set internal rsync over ssh backups to use arcfour (rc4) for performance
[chef.git] / cookbooks / thinkup / templates / default / backup.cron.erb
1 #!/bin/sh
2
3 # DO NOT EDIT - This file is being maintained by Chef
4
5 T=$(mktemp -d -t -p /var/tmp thinkup.XXXXXXXXXX)
6 D=$(date +%Y-%m-%d)
7 B=thinkup-$D.tar.gz
8
9 mkdir $T/thinkup-$D
10 mysqldump --user=thinkup --password=<%= @passwords["database"] %> --opt thinkup > $T/thinkup-$D/thinkup.sql
11 ln -s /srv/thinkup.openstreetmap.org $T/thinkup-$D/www
12
13 export GZIP="--rsyncable -9"
14 export RSYNC_RSH="ssh -ax -c arcfour"
15
16 nice tar --create --gzip --dereference --directory=$T --file=$T/$B thinkup-$D
17 nice rsync $T/$B backup::backup
18
19 rm -rf $T