Nethserver rsync migration

I dirty moved the server with rsync that I have done numerous times with other servers, so just have a few specific questions.

Obviously, I can’t access anything over the web on this server. I have done db networks command and signal-event. db networks show has the correct info.

I cannot access https://IP-ADDRESS:980. Just says took too long to respond.

Shorewall is losing its mind. I still cant access anything after shorewall clear and shorewall stop.

Is nethserver listening on IP hardcoded somewhere or am i missing something completely? Thanks.

What was the rsync command you used ?

The event is interface-update ?

What is the output of db networks show ?

Can you diagnostic on the server (in the terminal) and see if the server got a connection

ip addr
traceroute google.com
ping google.com

Do you have installed fail2ban and you are locked outside ?

You have a hidden action which is supposed to reconfigure anything, in last resort you could try to use it.

/etc/e-smith/events/actions/system-adjust

1 Like

I can get in and out of the server without issue. It’s all the web services I can’t access. The web interface on port 980 or nextcloud. System adjust command didn’t yield any results. Same issue.

systemctl status httpd httpd-admin

Check errors in log for httpd and httpd-admin

ok i figured it out. I was using the -u flag by accident so existing files weren’t being overwritten.

I used the command below for rsync

rsync -aHxvzP --progress --numeric-ids --exclude=/etc/fstab --exclude=/etc/network/* --exclude=/proc/* --exclude=/tmp/* --exclude=/sys/* --exclude=/dev/* --exclude=/mnt/* --exclude=/boot/* --exclude=/root/* root@SRC-IP:/* /

After all files have been copied, run rsync again just to make sure its updated, then do the items below and reboot

After editing /etc/sysconfig/network-scripts, /etc/hosts and running db networks everything works as its supposed to. Shorewall will need to be disabled temporarily while changing these items with shorewall stop and shorewall clear.

Also, would be wise to grep for old IP in /etc folder as some modules hardcode the IP for example docker does.

db networks set eth0 ethernet role green ipaddr YOUR_PUBLIC_IP netmask YOUR_NETMASK network YOUR_NETWORK_ADDR onboot yes bootproto static

did you see this documentation ?

http://docs.nethserver.org/en/v7/migration.html#migration-with-rsync

a tip for discourse, please answer to a thread, your recipient will be immediately notified :smiley:

This topic is interesting I would like more people on it, why did you simply not save the /var/lib/nethserver/ folder?

I ultimately didn’t want to reconfigure everything. Took awhile to get it exactly the way I wanted it to be and prolly forgot half of what I did with it originally. I did see that article but I saw SME and skipped right over it. I just used this method to copy 4 VPSs to new hosts. Other than IP issue I haven’t had a problem doing this method.

1 Like

thank to share your experience, we could change the topic of this post to Nethserver rsync migration with an accepted solution on your post with the command. It could help others, what do you think ?

1 Like

updated the post with a bit more clarification and marked it the solution. Thanks

1 Like