directory repository_directory
variables :realm => "Subversion Repository", :password_file => "/etc/apache2/svn.passwd"
end
+
+template "/etc/cron.daily/svn-backup" do
+ source "backup.cron.erb"
+ owner "root"
+ group "root"
+ mode 0755
+end
--- /dev/null
+#!/bin/sh
+
+# DO NOT EDIT - This file is being maintained by Chef
+
+T=$(mktemp -d -t -p /var/tmp svn.XXXXXXXXXX)
+D=$(date +%Y-%m-%d)
+B=svn-$D.tar.gz
+
+nice svnadmin hotcopy /var/lib/subversion/repos/openstreetmap $T/svn-$D > /dev/null
+
+export GZIP="--rsyncable -9"
+
+nice tar --create --gzip --directory=$T --file=$T/$B svn-$D
+nice rsync $T/$B backup::backup
+
+rm -rf $T