From 92404da27376766826d6c5117c1e8bdc787bba0f Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 23 Aug 2016 17:25:40 +0200 Subject: syncrepo.sh: Add some documentation Signed-off-by: Florian Pritz --- syncrepo.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'syncrepo.sh') diff --git a/syncrepo.sh b/syncrepo.sh index 73436b5..23cc26e 100755 --- a/syncrepo.sh +++ b/syncrepo.sh @@ -1,11 +1,20 @@ #!/bin/bash +# This is a simple mirroring script. To save bandwidth it first checks a +# timestamp via HTTP and only runs rsync when the timestamp differs from the +# local copy. As of 2016, a single rsync run without changes transfers roughly +# 6MiB of data which adds up to roughly 250GiB of traffic per month. Performing +# a simple check via HTTP first can thus save a lot of traffic. + home="/srv" target="${home}/repo" tmp="${home}/tmp" lock='/tmp/mirrorsync.lck' +# NOTE: You'll probably want to change this or remove the --bwlimit setting in +# the rsync call below bwlimit=4096 -# NOTE: you very likely need to change this since rsync.archlinux.org requires you to be a tier 1 mirror +# NOTE: most people reading this very likely need to change this since +# rsync.archlinux.org requires you to be a tier 1 mirror source='rsync://rsync.archlinux.org/ftp_tier1' lastupdate_url="http://rsync.archlinux.org/lastupdate" -- cgit v1.2.3-24-g4f1b