同步外网清华源的ubuntu源到内网使用
1.内网源使用只需要dist目录和pool目录
18.04 = bionic、20.04 = focal、22.04 = jammy、24.04 = noble
#同步ubuntu18.04的dists目录
rsync -avz --delete --bwlimit=10000 --include="dists/bionic/**" --exclude="pool/**" --exclude="*.iso" --exclude="dists/*/main/debian-installer" rsync://mirrors.tuna.tsinghua.edu.cn/ubuntu/ /data/ubuntu-repos/
#同步ubuntu20.04的dists目录
rsync -avz --delete --bwlimit=10000 --include="dists/focal/**" --exclude="pool/**" --exclude="*.iso" --exclude="dists/*/main/debian-installer" rsync://mirrors.tuna.tsinghua.edu.cn/ubuntu/ /data/ubuntu-repos/
#同步ubuntu22.04的dists目录
rsync -avz --delete --bwlimit=10000 --include="dists/jammy/**" --exclude="pool/**" --exclude="*.iso" --exclude="dists/*/main/debian-installer" rsync://mirrors.tuna.tsinghua.edu.cn/ubuntu/ /data/ubuntu-repos/
#同步ubuntu24.04的dists目录
rsync -avz --delete --bwlimit=10000 --include="dists/noble/**" --exclude="pool/**" --exclude="*.iso" --exclude="dists/*/main/debian-installer" rsync://mirrors.tuna.tsinghua.edu.cn/ubuntu/ /data/ubuntu-repos/
#同步pool目录,pool目录是所有ubuntn的包,不到4T, 无法只同步指定版本的
rsync -avz --delete --bwlimit=5000 --include="pool/main/**" --include="pool/restricted/**" --include="pool/universe/**" --include="pool/multiverse/**" --exclude="dists/**" --exclude="pool/*/debug" --exclude="*.iso" rsync://mirrors.tuna.tsinghua.edu.cn/ubuntu/ /data/ubuntu-repos/
2.最后把ubuntu-repos目录同步到内网环境,在通过nginx指向这个目录即可