#!/bin/bash
# sourcehost: choose a mirror in your proximity!
HOST=ftp.us.debian.org;
# destination directory
DEST=/srv/dists/bookworm/localmirror
# Debian version(s) to mirror
DIST=bookworm
# architecture, use what is applicable here.
ARCH=amd64
# log timestamp
logger -t mirror[$$] updating Debian mirror
su mirror -c \
"debmirror ${DEST} \
--nosource \
--host=${HOST} \
--root=/localmirror \
--dist=${DIST} \
--section=main,non-free \
--i18n \
--arch=${ARCH} \
--passive --cleanup \
$VERBOSE"
logger -t mirror[$$] finished updating Debian mirror