From 465ec2e84e543a9720810eee40b457cc6cdd10f6 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 17 Sep 2020 11:43:16 +0200 Subject: [PATCH] mirror-to-mirror.sh: also sync to ftp.lysator.liu.se, in parallel This is the deployed script for pushing to the primary mirrors. It starts with the 'repo' section and runs all the rsyncs in parallel to each primary mirror. Once the 'repo' syncs are done, it does the same process for the 'archive' syncs. [skip ci] --- examples/mirror-to-mirror.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/examples/mirror-to-mirror.sh b/examples/mirror-to-mirror.sh index fa7e88b5..ecb4c10e 100644 --- a/examples/mirror-to-mirror.sh +++ b/examples/mirror-to-mirror.sh @@ -14,11 +14,15 @@ flock -n 200 set -e cd /home/fdroid for section in repo archive; do - for host in fdroid@mirror.f-droid.org; do - # be super careful with the trailing slashes here! if one is wrong, it'll delete the entire section! - rsync --archive --delay-updates --progress --delete \ - /home/fdroid/public_html/${section} \ - ${host}:/srv/fdroid-mirror.at.or.at/htdocs/fdroid/ + echo "Started $section at `date`:" + for host in fdroid@mirror.f-droid.org fdroid@ftp-push.lysator.liu.se; do + set -x + # be super careful with the trailing slashes here! if one is wrong, it'll delete the entire section! + rsync --archive --delay-updates --progress --delete \ + /home/fdroid/public_html/${section} \ + ${host}:/srv/fdroid-mirror.at.or.at/htdocs/fdroid/ & + set +x done + wait done ) 200>/var/lock/root_fdroidmirrortomirror