I have cloned an AlmaLinux 8.6 server to another AlmaLinux 8.6 server using the following command.
sudo rsync -vPa -e 'ssh -o StrictHostKeyChecking=no' --exclude-from=/root/exclude-files.txt / [[REMOTE-SERVER-IP]]:/
My /root/exclude-files.txt file contains the following things.
/dev
/tmp
/sys
/proc
/backup
/run
/media
/lost+found
/etc/fstab
/etc/mtab
/etc/mdadm.conf
/etc/sysconfig/network*
But after cloning process completed, I can't login to cloned server. After entering the root password, system send me again to the login page. Putty says connection is refused.