安装镜像同步工具

sudo apt-get install -y apt-mirror

配置同步参数

查看最终效果

cat /etc/apt/mirror.list

内容

############# config ##################
# 设置基础同步路径
set base_path    /data/apt-mirror
#
# set mirror_path  $base_path/mirror
# set skel_path    $base_path/skel
# set var_path     $base_path/var
# set cleanscript $var_path/clean.sh
# 设置需要同步的默认架构
set defaultarch  arm64
# set postmirror_script $var_path/postmirror.sh
# set run_postmirror 0
set nthreads     20
set _tilde 0
#
############# end config ##############
# 设置需要同步的源
deb http://mirrors.aliyun.com/debian/ bullseye main non-free contrib

开始同步

sudo apt-mirror 

效果

image-1679902876889