#!/bin/sh
-RSYNCSOURCE=rsync://archive.ubuntu.com/ubuntu
+RSYNCSOURCE=rsync://us.archive.ubuntu.com/ubuntu
#RSYNCSOURCE=rsync://ubuntu.media.mit.edu/ubuntu
BASEDIR=${MIRRORDIR}/ubuntu
set -e
set -u
+# 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
+PASS1=(--exclude Packages\* --exclude Sources\* --exclude Release\* --exclude InRelease --exclude i18n/\* --exclude ls-lR\* --exclude Translation\*)
+
rsync --recursive --times --links --hard-links \
--stats \
--verbose --timeout=600 \
- --exclude "Packages*" --exclude "Sources*" \
- --exclude "Release*" \
+ "${PASS1[@]}" \
${RSYNCSOURCE} ${BASEDIR}
rsync --recursive --times --links --hard-links \