Local Repo issue

Hello Alma community,

I am trying to build a local repository so that only one machine needs to fetch updates. However, it appears that nothing happens after I run the yum/dnf update command. It gets to the point of:

AlmaLinuxmirror 154 MB/s | 494 MB 00:03

I wonder if I might be doing something wrong or if I have misunderstood the process. I look forward to your responses.

how I proceeded :

Mirror rsync
/usr/bin/rsync -avSH --exclude=‘.~tmp~’ --delete-delay --delay-updates rsync://mirror.hs-esslingen.de/almalinux/ /mnt/almalinuxmirror/

crontab -e
0 */3 * * * sleep $(((RANDOM%3500)+1)) && /usr/bin/flock -n /var/run/almalinux_rsync.lock -c "/usr/bin/rsync -avSH --exclude=‘.~tmp~’ --delete-delay --delay-updates rsync://mirror.hs-esslingen.de/almalinux/ /mnt/almalinuxmirror/

[root@vm-alma-mirror conf.d]# cat almalinuxmirror.conf
Alias /almalinuxmirror /mnt/almalinuxmirror
<Directory /mnt/almalinuxmirror>
Require all granted

and i use the createrepo. for metadata

on the Client:
[root@vm-alma-test yum.repos.d]# cat localalmamirrior.repo
[vm-alma-mirror]
name=AlmaLinuxmirror
baseurl=http://10.250.0.70/almalinuxmirror/
enabled=1
gpgcheck=0
countme=0
gpgkey=0
metadata_expire=6h
enabled_metadata=1

Thank you!

Hello @rdba, welcome to the forum!

Please provide the exact “dnf update” command and its output as well.

Also, did you configure the /etc/yum.repos.d/whatever.repo file on your yum|dnf client?

I do something similar, but I don’t copy all:

RSYNC="/usr/bin/rsync -aqH --no-g --no-o --delete --delay-updates --bwlimit=1024"
MIRROR=rsync://rsync.nic.funet.fi/ftp/pub/mirrors/almalinux.org
VERS=9.4
SOURCE=${MIRROR}/${VERS}
DEST=/export/ds1/site/mirrors/almalinux.org/${VERS}

for R in BaseOS AppStream CRB extras
do
  ${RSYNC} ${SOURCE}/${R}/x86_64/os/ ${DEST}/${R}/x86_64/os/
done

That is not the issue here though.
Note how …pub/mirrors/almalinux.org/9.4/BaseOS/x86_64/os/
got copied into …mirrors/almalinux.org/9.4/BaseOS/x86_64/os/

My DNF uses:

[my-baseos]
baseurl = file:///site/mirrors/almalinux.org/$releasever/BaseOS/$basearch/os/
cost = 990
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9
metadata_expire = 24h
name = My - Alma $releasever - BaseOS
skip_if_unavailable = 1

and there are similar entries for AppStream, CRB, and extras.
The point is that the baseurl points to a directory (./.x86_64/os/) that contains directory repodata

Thank you for the responses. I applied a few things from you, then ran createrepo for the metadata, and it worked.