There is a server which is offline and doesn't have any connection to the Internet.
Then we need station (or laptop / virtual machine), which has the same major Red Hat Enterprise Linux version as server and is connected to the Red Hat Network/Proxy/Satellite.
Copy the /var/lib/rpm to the station connected to the Internet (you can use USB/CD…)
scp -r /var/lib/rpm root@station:/tmp/
Install the download only plugin for yum and createrepo on the machine which is connected to the Internet (Red Hat Network):
yum install yum-downloadonly createrepo
yum clean all
Backup the original rpm directory on the station and replace it with the rpm directory from the "offline" server:
mv -v /var/lib/rpm /var/lib/rpm.orig
mv -v /tmp/rpm /var/lib/
Download updates to /tmp/rpm_updates and return back the /var/lib/rpm
mkdir -v /tmp/rpm_updates
yum update --downloadonly --downloaddir /tmp/rpm_updates
rm -rvf /var/lib/rpm
mv -v /var/lib/rpm.orig /var/lib/rpm
Transfer the downloaded rpms to the server and update:
scp -r /tmp/rpm_updates root@server:/tmp/
cat > /etc/yum.repos.d/rhel-offline-updates.repo << \EOF
name=Red Hat Enterprise Linux $releasever - $basearch - Offline Updates Repository
…and the server is updated.
These updates are the same as if "yum update" had been executed on a station that had a connection to the Internet.