summaryrefslogtreecommitdiff
path: root/bin/ftpsync
diff options
context:
space:
mode:
authorJoerg Jaspert <joerg@debian.org>2008-11-15 14:31:38 +0100
committerJoerg Jaspert <joerg@debian.org>2008-11-15 14:31:38 +0100
commit93523c625c9bdb68037c7b2ce8db65eb30c2e375 (patch)
tree9d21c2880c97283e1fe4d9e2824a1672c425398a /bin/ftpsync
parent2cbc1a32c190aa7078000447529eb78067177861 (diff)
ftpsync
optimize filter rules, so we no longer delete our trace files Signed-off-by: Joerg Jaspert <joerg@debian.org>
Diffstat (limited to 'bin/ftpsync')
-rwxr-xr-xbin/ftpsync5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/ftpsync b/bin/ftpsync
index ec06c7c..5aebff5 100755
--- a/bin/ftpsync
+++ b/bin/ftpsync
@@ -245,8 +245,11 @@ TRACE=${TRACE:-"project/trace/${MIRRORNAME}"}
# rsync program
RSYNC=${RSYNC:-rsync}
+# Rsync filter rules. Used to protect various files we always want to keep, even if we otherwise delete
+# excluded files
+RSYNC_FILTER=${RSYNC_FILTER:-"--filter=protect_Archive-Update-in-Progress-${MIRRORNAME} --filter=protect_${TRACE} --filter=protect_Archive-Update-Required-${MIRRORNAME}"}
# Default rsync options for *every* rsync call
-RSYNC_OPTIONS=${RSYNC_OPTIONS:-"-rltvHSB8192 --timeout 3600 --stats --exclude Archive-Update-in-Progress-${MIRRORNAME} --exclude ${TRACE} --exclude Archive-Update-Required-${MIRRORNAME}"}
+RSYNC_OPTIONS=${RSYNC_OPTIONS:-"-rltvHSB8192 --timeout 3600 --stats ${RSYNC_FILTER}"}
# Options we only use in the first pass, where we do not want packages/sources to fly in yet and dont want to delete files
RSYNC_OPTIONS1=${RSYNC_OPTIONS1:-"--exclude Packages* --exclude Sources* --exclude Release* --exclude ls-lR*"}
# Options for the second pass, where we do want everything, including deletion of old and now unused files