This server exports all repositories for RHEL8 and uses btrfs to keep weekly snapshots of these. The btrfs is mounted at /var/www/html . Here the 'hot' directory is a sub-volume and the 'cold-*' directories are snapshots of the hot.

This system forms an integral part of the psi.packer ansible role.

Other than the initial setup of the btrfs, everything under /var/www/html/ is created and modified automatically. No file here should ever be touched manually.

The scripts and configuration files for the reposync system are found under /srv and they are triggered by /etc/crontab

The contents of /srv :

Directories:

* **gpg** - contains the GPG files used by the repos
* **repos** - must have one repo file for each repo to be mirrored, the name must be the same for the repo file as the repo defined inside and this name must only contain alphanumeric characters or underscores (no dashes or dots)
* **rhn** - contains the certificates, which enable access to the redhat CDN. The TLS files are actively pulled from pxeserv01, as these expire and get renewed with some frequency.
* **zoom** - this is where the zoom repo is created

Files:

* **header.sh** - Creates the /var/www/html/hot/stat/ files and the header.html, which all become part of each snapshot
* **list.sh** - Creates the list.html from the stat files
* **sync_nosnap.sh** - Runs daily, runs the sync and list scripts
* **sync.sh** - run by the other 2 sync scripts to perform the actual reposync, creates the list.api file and runs the header script
* **sync_snap.sh** - Once a week, run the sync, create a snapshot, update the local host and reboot
* **zoom.sh** - script to pull the zoom.rpm and create the repo
