diff options
author | Florian Pritz <bluewind@xinu.at> | 2016-08-23 17:25:40 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2016-08-23 17:25:40 +0200 |
commit | 92404da27376766826d6c5117c1e8bdc787bba0f (patch) | |
tree | a5bc03357f57473289de5a47e78dbfae48559980 | |
parent | bca1d3bd5c29b35645ed54b28487de4f18f5d63e (diff) | |
download | bin-92404da27376766826d6c5117c1e8bdc787bba0f.tar.gz bin-92404da27376766826d6c5117c1e8bdc787bba0f.tar.xz |
syncrepo.sh: Add some documentation
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-x | syncrepo.sh | 11 |
1 files changed, 10 insertions, 1 deletions
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" |