Migrating from SME 9.2 - nethserver-hotsync

@federico.ballarini

Will try (again --> https://docs.nethserver.org/en/v7/hotsync.html) did so already because I read about it in the forum and in the how-to. Need some time, I’m about 50 km away from the machines, right no I have no connection. Should be up again in an hour or so.

1 Like

Ok, thanks. Post here the output of /var/log/messages after launch the command and also the output of hotsync and hotsync-slave command as before.

Unfortunately still no connection to the server. :frowning_face: Has to wait til monday, I’m sorry.

1 Like

No problem, have a nice weekend!

@schulzstefan I did some test on two clean machines installed starting from 7.9 ISO. No errors. Which modules have you configured?

I tried also to not configure slave or have a wrong password but I can’t reproduce your error. Maybe signal-event nethserver-hotsync-save can solve. If it doesn’t work we can re-configure the module.

Here is my configuration.

MASTER

[root@master ~]# rpm -q nethserver-hotsync
nethserver-hotsync-2.2.2-1.ns7.noarch

[root@master ~]# config show hotsync
hotsync=configuration
    MasterHost=
    SlaveHost=192.168.72.201
    SlavePort=273
    databases=enabled
    role=master
    status=enabled

[root@master ~]# config show rsyncd
rsyncd=service
    TCPPort=873
    password=testpass
    status=disabled

[root@master ~]# hotsync
===== Report for configuration backup =====
Backup started at 2021-01-16 18:13:59
Event pre-backup-config: SUCCESS
Action backup-config-execute: SUCCESS
Event post-backup-config: SUCCESS
Backup status: SUCCESS
Backup ended at 2021-01-16 18:14:00
Time elapsed: 0 hours, 0 minutes, 1 seconds

SLAVE

[root@slave ~]# rpm -q nethserver-hotsync
nethserver-hotsync-2.2.2-1.ns7.noarch

[root@slave ~]# config show hotsync
hotsync=configuration
    MasterHost=192.168.72.200
    SlaveHost=
    SlavePort=273
    databases=enabled
    role=slave
    status=enabled

[root@slave ~]# config show rsyncd
rsyncd=service
    TCPPort=873
    password=testpass
    status=enabled

[root@slave ~]# hotsync-slave
Loaded plugins: changelog, fastestmirror
Loading mirror speeds from cached hostfile
 * ce-base: mirrors.prometeus.net
 * ce-extras: mirrors.prometeus.net
 * ce-sclo-rh: mirrors.prometeus.net
 * ce-sclo-sclo: mirrors.prometeus.net
 * ce-updates: mirrors.prometeus.net
 * epel: mirror.de.leaseweb.net
 * nethforge: markusneuberger.at
 * nethserver-base: markusneuberger.at
 * nethserver-updates: markusneuberger.at
Package nethserver-backup-config-2.5.1-1.ns7.noarch already installed and latest version
Package nethserver-backup-data-1.7.4-1.ns7.noarch already installed and latest version
Package nethserver-base-3.7.9-1.ns7.noarch already installed and latest version
Package nethserver-cockpit-1.7.21-1.ns7.noarch already installed and latest version
Package nethserver-cockpit-lib-1.7.21-1.ns7.noarch already installed and latest version
Package nethserver-collectd-3.1.1-1.ns7.noarch already installed and latest version
Package nethserver-diagtools-1.0.3-1.ns7.noarch already installed and latest version
Package nethserver-dnsmasq-1.7.2-1.ns7.noarch already installed and latest version
Package nethserver-duc-1.7.0-1.ns7.noarch already installed and latest version
Package nethserver-firewall-base-3.13.5-1.ns7.noarch already installed and latest version
Package nethserver-hosts-1.2.2-1.ns7.noarch already installed and latest version
Package nethserver-hotsync-2.2.2-1.ns7.noarch already installed and latest version
Package nethserver-httpd-3.12.0-1.ns7.noarch already installed and latest version
Package nethserver-lang-cockpit-1.4.6-4.ns7.noarch already installed and latest version
Package nethserver-letsencrypt-1.2.0-1.ns7.noarch already installed and latest version
Package nethserver-lib-2.2.11-1.ns7.noarch already installed and latest version
Package nethserver-lsm-1.2.3-1.ns7.noarch already installed and latest version
Package nethserver-mail-smarthost-2.29.6-1.ns7.noarch already installed and latest version
Package nethserver-netdata-2.0.0-1.ns7.noarch already installed and latest version
Package nethserver-nethforge-release-7-3.ns7.noarch already installed and latest version
Package nethserver-ntp-1.1.3-1.ns7.noarch already installed and latest version
Package nethserver-openssh-1.8.0-1.ns7.noarch already installed and latest version
Package nethserver-phonehome-1.4.0-1.ns7.noarch already installed and latest version
Package nethserver-php-1.3.0-1.ns7.noarch already installed and latest version
Package nethserver-release-7-19.ns7.noarch already installed and latest version
Package nethserver-smartd-1.1.0-1.ns7.noarch already installed and latest version
Package nethserver-sssd-1.7.0-1.ns7.noarch already installed and latest version
Package nethserver-subscription-3.6.7-1.ns7.noarch already installed and latest version
Package nethserver-subscription-inventory-3.6.7-1.ns7.x86_64 already installed and latest version
Package nethserver-subscription-ui-3.6.7-1.ns7.noarch already installed and latest version
Package nethserver-yum-1.4.1-1.ns7.noarch already installed and latest version
Nothing to do

Also with special chars in the password I can’t reproduce.

1 Like

@federico.ballarini

I appreciate your help very much. I’ll be back with my investigations on monday.

Have a nice sunday - in Germany near to Stuttgart we have snow today.

1 Like

@federico.ballarini

It seems hotsync is running on both machines without errors. I didn’t have time to perform a hotsync-promote in my VE with two NS servers. Will do that during the week and let you know about the result.

One thing that make me wonder a little bit, is that after the initial sync (master and slave) the slave adepts the FQHN from the master. Is that really correct?

Meanwhile thank you for your help and time.

regards,
stefan

1 Like

No. The slave should have his fqdn unitl you launch hotsync-promote (in case of master crash) command.

Should I change it back?

It’s strange that it is changed. IP address is different, correct?

Indeed. IP has remained. Also the company name has not changed. No users and groups have been imported. On the backup-page the system backup has been imported, not the data-backup. Letsencrypt cert and own cert is imported. Applications have been imported, as far as I see, no services yet.

That’s correct. Server will import your configurations after promote. Try to change back your hostname on slave and check if it change again.

I’ll do and report.

1 Like

In a VE I set up two NS servers. One production and one backup, both up-to-date.

rpm -q nethserver-hotsync
nethserver-hotsync-2.2.4-1.ns7.noarch

For the password of the hotsync module I had to use the gui, from the cli it didn’t work. Even with signal-event nethserver-hotsync-save. There was an issue with the stephdl repo GPG key in etc. I could solve this by installing the stephdl repo on the backup server.

VERY interesting - the backup server keeps the FQHN in the VE. In real it was definitely overwritten with the FQHN of the production server after the hotsync command.

Reading the how-to https://docs.nethserver.org/en/v7/hotsync.html#supported-packages I don’t see SOGo but I assume, it’s in the backup, is it?

Any chance to backup directories in /opt? I am running a firebase-superserver with a database in /opt/somedirectory/andsubdirectories… Also the question, if an so called not-nethserver-rpm will be backed up also?

EDIT:

I assume this covers my last question:

“By default all data included in backup are synchronized every 15 minutes.” Is it the config and the data backup?

So, in your VE all is working fine. Correct?
If yes I think the real slave machine had some problems (hope solved).

Yes, if I don’t make a mistake should be enough to add it to custom backup path. In Cockpit > Backup > Configure

You should see it on slave server (use ls -l to check the folder).

Yes.

@federico.ballarini

One of the first things I configured after taking the server in production, was the backup on an USB-disk. In the custom backup configuration file I defined to backup /etc, /lib, /usr and /opt. As this config is also be taken for hotsync, I strongly assume, that this is the reason for changing FQHN.

I didn’t put the slave in production yet (promote). Will do this in the evening today and tell you about the result.

Let’s mark this topic as solved. Thank you very much for your help and staying with me. Again, I appreciate it very much, as backup and restore are essential for running a server.

Oh yes. This is the cause. It isn’t necessary to backup etc dir if you don’t have customizations.
Nethserver will recreate it.

@federico.ballarini

Nope, not solved yet.

How can we investigate?

Just a wild shot: is one of the servers a subscribed system?
If so the nethforge repo (where hotsync lives in) is probably disabled on that server…

@mark_nl

None of the servers is subscribed yet. Maybe the reason is the custom backup I made with /etc, /lib, /usr, /opt? Well, /opt surely not…