From abb71dc00961ba66f2ec7989274b7b6950eed815 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Fri, 15 Jul 2022 18:20:33 +0300 Subject: [PATCH] subversion: backup svn.passwd --- cookbooks/subversion/templates/default/backup.cron.erb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cookbooks/subversion/templates/default/backup.cron.erb b/cookbooks/subversion/templates/default/backup.cron.erb index d82348da8..4e53d3840 100644 --- a/cookbooks/subversion/templates/default/backup.cron.erb +++ b/cookbooks/subversion/templates/default/backup.cron.erb @@ -6,11 +6,14 @@ 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 +mkdir $T/svn-$D +ln -s /etc/apache2/svn.passwd $T/svn-$D/svn.passwd + +nice svnadmin hotcopy /var/lib/subversion/repos/openstreetmap $T/svn-$D/repo > /dev/null export RSYNC_RSH="ssh -ax" -nice tar --create --directory=$T svn-$D | nice gzip --rsyncable -9 > $T/$B +nice tar --create --dereference --directory=$T svn-$D | nice gzip --rsyncable -9 > $T/$B nice rsync --preallocate --fuzzy $T/$B backup::backup rm -rf $T -- 2.39.5