Help needed to migrate CentOS 7.x to Rocky Linux 7.x

Help needed to migrate CentOS 7.x to Rocky Linux 7.x, I tried to follow the steps to migrate to centos8 and then to rocky, which is failing for me at dnf install. Please help with steps to migrate CentOS 7.x to Rocky Linux 7.x

First of all, there is no Rocky Linux 7. There are only RL8 and RL9.

Second, there is no official support for in-place upgrade from one major version to an another. Not in CentOS Linux nor in Rocky Linux.

A system has essentially three components:

  1. OS files
  2. Configuration
  3. User data

Lets suppose that something happens to your system (The dog ate it!).

  • You can reinstall OS files from packages (if you know which packages you had, or what is equivalent). The list of packages is part of configuration.
  • The configuration you have to have somewhere stored in format that you can re-apply. If packages/distro change, then you have to adapt the config. The config in EL7 is different than in EL8 or EL9.
  • The user data you restore from backup.

If the dog had trashed your system before EL8 was released, then you would have had to reinstall CentOS 7. Surely you have installed your CentOS 7 in a way that makes reinstall easy?
Now you could (re)install CentOS 7, Rocky Linux 8, or Rocky Linux 9.