Update centos-10-sync script to rsync

Signed-off-by: james02135 <james02135@hotmail.com>

Change DESTDIR to previously used directory, exlcude debug directory

Signed-off-by: james02135 <james02135@hotmail.com>
This commit is contained in:
james02135 2024-06-18 15:34:57 +01:00 committed by kevin
parent bba5d4340e
commit decfe3e771

View file

@ -1,21 +1,18 @@
#!/bin/sh
#Sync using reposync instead of rsync until available
SERVER=composes.stream.centos.org
TOPDIR=stream-10/production/latest-CentOS-Stream/compose
## mirror CentOS-10
DESTDIR=/mnt/fedora/app/fi-repo/centos/centos-10
mkdir -p ${DESTDIR}
for basearch in aarch64 ppc64le s390x x86_64
do
for repo in BaseOS AppStream CRB
do
mkdir -p $DESTDIR/$repo/$basearch
cd $DESTDIR/$repo/$basearch
reposync --download-metadata --disablerepo=* --repofrompath=os,https://$SERVER/$TOPDIR/$repo/$basearch/os/ --enablerepo=os
done
done
## Set up variables we use
RSYNC='/usr/bin/rsync'
RS_OPT="-avSHP --numeric-ids"
RS_DEADLY="--delete --delete-delay --delay-updates"
CENT_EXCLUDES="--exclude=isos --exclude=kickstart --exclude=images --exclude=debug"
SERVER=centos-master01.iad2.fedoraproject.org
## Mirror CentOS-10-Stream
RSYNC_DESTDIR=/mnt/fedora/app/fi-repo/centos/centos-10/
RSYNC_MOD="CentOS-Stream-Ref/10-stream/"
mkdir -p ${RSYNC_DESTDIR}
${RSYNC} ${RS_OPT} ${RS_DEADLY} ${CENT_EXCLUDES} ${SERVER}::${RSYNC_MOD} ${RSYNC_DESTDIR}