2

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.

1 Answers1

0

The problem was with the SELinux. My Almalinux server was SELinux enabled. That's why rsync was not able to fully clone the server to the destination server. So I disabled SELinux on both source and destination servers and cloned using following command and everything worked like charm.

sudo rsync -vPa -e 'ssh -o StrictHostKeyChecking=no' --exclude-from=/root/exclude-files.txt / [[REMOTE-SERVER-IP]]:/