mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-19 19:46:38 +08:00
27 lines
1.2 KiB
Bash
27 lines
1.2 KiB
Bash
#!/bin/sh
|
|
|
|
## Set up variables we use
|
|
RSYNC='/usr/bin/rsync'
|
|
RS_OPT="-avSHP --numeric-ids"
|
|
RS_DEADLY="--delete --delete-excluded --delete-delay --delay-updates"
|
|
CENT_EXCLUDES="--exclude=HighAvailability --exclude=NFV --exclude=RT --exclude=source --exclude=debug --exclude=iso --exclude=.discinfo --exclude=.treeinfo --exclude=EFI --exclude=EULA --exclude=LICENSE --exclude=boot --exclude=extra_files.json --exclude=generic.ins --exclude=images --exclude=media.repo --exclude=ppc"
|
|
|
|
SERVER=centos-master01.rdu3.fedoraproject.org
|
|
|
|
## Mirror CentOS-10-Stream
|
|
|
|
RSYNC_DESTDIR=/mnt/fedora/app/fi-repo/centos/centos-10/
|
|
RSYNC_SNAPDIR=/mnt/fedora/app/fi-repo/centos/centos-10-snapshot/
|
|
RSYNC_MOD="CentOS-Stream-Ref/10-stream/"
|
|
|
|
mkdir -p ${RSYNC_DESTDIR} ${RSYNC_SNAPDIR}
|
|
|
|
${RSYNC} ${RS_OPT} ${RS_DEADLY} ${CENT_EXCLUDES} ${SERVER}::${RSYNC_MOD} ${RSYNC_DESTDIR}
|
|
|
|
# Duplicate the sync directory. Before CentOS 10 starts getting RHEL 10.x+1
|
|
# changes, we need to comment this out to have a snapshot of CentOS 10 that
|
|
# resembles RHEL 10.x for the epel10.x-build tag to use temporarily until the
|
|
# actual RHEL 10.x is released.
|
|
# https://forge.fedoraproject.org/infra/tickets/12394
|
|
${RSYNC} ${RS_OPT} ${RS_DEADLY} --link-dest=${RSYNC_DESTDIR} ${RSYNC_DESTDIR} ${RSYNC_SNAPDIR}
|