Cannot use rsync-migrate

**NethServer Version: 7.6
**Module: rsync-migrate

Hi there,

I’m trying to migrate a nethserver 7.6 to a new server but everytime i try to launch the rsync-migrate script i get the error below. I’ve tryed to alter the ciphers and the sshd_config its the same between servers but i had no luck. I’ve also tryed to locate the rsync-migrate script with no sucess.
I also can ssh between the servers without any problem.

I’m really stuck and would really apreciate if someone could give-me some pointers.

Best Regards

Error message

[root@localhost /]# rsync-migrate 10.0.x.x 22
Creating migration dir: /var/lib/migration

Sync-only mode enabled: no action will be perfomed on the remote machine

Unable to negotiate with 10.0.1.254 port 22: no matching cipher found. Their offer: chacha20-poly1305@openssh.com,aes256-ctr,aes128-ctr,aes128-cbc,aes192-cbc,aes256-cbc
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(226) [Receiver=3.1.2]

Synchronization finished!

Can you give us more information about your network?
IP of actual NethServer?
IP of new server?

But new server it’s always a NethServer or another distro? Why did you choose to change?

You have to use rsync-migrate or you can use “normal” rsync?

Hi Frederico

Both servers are nethserver 7.6.
We are upgrading the server as we’re gonna start hosting some more services like nextcloud, email and sogo groupware.

It’s my first migration between Nethservers didn’t try normal rsync.

Like i said i’m trying to locate the rsync-migrate script so i can force the cipher type when establishing conection between both servers.

Best Regards

Tiago

You cannot use backup and restore method? You can use it if you can be down with files temporarily (during the migration).

If u can’t use backup/restore try this command:
rsync -avzhe ssh sourcedir root@destIP:/destdir/

I think you have to copy

  • /var/lib/nethserver/ibay
  • /var/lib/nethserver/vmail
  • /var/lib/nethserver/vhost

If you have any other folder to copy you can use always this command. Remember to install module and/or import configuration on new server before copy files.

If you use backup-restore method you can use command restore-data after you have restore configuration. (http://docs.nethserver.org/en/v7/backup.html#disaster-recovery-section)

You can also use --dry-run option of rsync to see its behavior.

i’ve made the migration like you said with the backup / Restore method of the configuration then used rsync to migrate the ibay /vmail /home folders in var/lib/nethserver.
DNS, Network, AD everything went well. Everytime i try to connect to a shared folder i get an error that the shared folder could not be found altough when i \ip or hostname i get to see all the shared folders.

Thought it could be permissions so i tryed to reset permissions on NS7 web interface and i’m meet with the following errors:

S20nethserver-ibays-set-permissions #1 (exit status 512)

S30nethserver-ibays-copy-permissions #2 (exit status 256)

any pointer?

Best regards

Are you using samba or LDAP?
Please check /var/log/messages.log if there is something that can be helpful.

Check also that package nethserver-samba is installed correctly with command
yum install nethserver-samba

Wait for your logs :slight_smile:

First of al thank you very much for all the help you keep on providing:

i’m getting that errors that the directories don’t exist, altough i can browse them in /var/lib/nethserver/ibay.

here are the message log

Feb 20 19:38:28 master nmbd[12130]: Samba name server MASTER is now a local master browser for workgroup LCR on subnet 192.168.1.64
Feb 20 19:38:28 master nmbd[12130]:
Feb 20 19:38:28 master nmbd[12130]: *****
Feb 20 19:38:40 master dbus[7731]: [system] Activating via systemd: service name=‘org.freedesktop.timedate1’ unit=‘dbus-org.freedesktop.timedate1.service’
Feb 20 19:38:40 master systemd: Starting Time & Date Service…
Feb 20 19:38:40 master dbus[7731]: [system] Successfully activated service ‘org.freedesktop.timedate1’
Feb 20 19:38:40 master systemd: Started Time & Date Service.
Feb 20 19:43:20 master dnsmasq-dhcp[16216]: DHCPDISCOVER(br0) 40:a8:f0:46:41:2d
Feb 20 19:43:20 master dnsmasq-dhcp[16216]: DHCPOFFER(br0) 10.0.1.169 40:a8:f0:46:41:2d
Feb 20 19:43:20 master dnsmasq-dhcp[16216]: DHCPREQUEST(br0) 10.0.1.164 d0:d2:b0:15:fa:ad
Feb 20 19:43:20 master dnsmasq-dhcp[16216]: DHCPACK(br0) 10.0.1.164 d0:d2:b0:15:fa:ad iPhone-de-Tiago
Feb 20 19:43:20 master dnsmasq-dhcp[16216]: DHCPREQUEST(br0) 10.0.1.169 40:a8:f0:46:41:2d
Feb 20 19:43:20 master dnsmasq-dhcp[16216]: DHCPACK(br0) 10.0.1.169 40:a8:f0:46:41:2d
Feb 20 19:43:25 master httpd: [NOTICE] Nethgui\Utility\Session: regenerate session id
Feb 20 19:43:29 master systemd: Started Session c131 of user root.
Feb 20 19:43:29 master esmith::event[19688]: Event: ibay-reset-permissions backups
Feb 20 19:43:29 master esmith::event[19688]: [ERROR] The ibay directory does not exist! /var/lib/nethserver/ibay/backups
Feb 20 19:43:29 master esmith::event[19688]: Action: /etc/e-smith/events/ibay-reset-permissions/S20nethserver-ibays-set-permissions FAILED: 2 [0.040258]
Feb 20 19:43:29 master esmith::event[19688]: [ERROR] shared folder not found: /var/lib/nethserver/ibay/backups
Feb 20 19:43:29 master esmith::event[19688]: Action: /etc/e-smith/events/ibay-reset-permissions/S30nethserver-ibays-copy-permissions FAILED: 1 [0.001894]
Feb 20 19:43:29 master esmith::event[19688]: Event: ibay-reset-permissions FAILED
Feb 20 19:43:30 master systemd: Removed slice User Slice of root.

In the page of Shared Folders you can see the directory or not?
Into /var/lib/nethserver/ibay/ yes if I understand.

yes i can see all the folders in web interface and browse them on ssh and scp.

Could you post output of command:
ls -l /var/lib/nethserver/ibay

Have you already rebooted the server after restore-data command? If not, reboot it and check boot up with command systemd-analyze (wait until server says “Boot complete”)

After reboot try to set permission from CLI with this command and post the output
signal-event ibay-reset-permissions backups

1 Like

Thank you so much!!! I’ve had an eureka moment when you asked me to list the ibay directory.
yes in fact there was an ibay directory inside /var/lib/nethserver/ibay. so after i’ve moved the folder to the top ibay directory everything worked fine.

Once more thank you so much for all the help :smiley:

If you come to Portugal you have a beer waiting for you!!

Best Regards

2 Likes

I’ll keep this :beers:
Please would you mark this topic as solved?

Have a nice evening :slight_smile: