Migration from NS7 to NS8

/etc/wireguard/wg0.conf
/etc/nethserver/wg0.key
/etc/nethserver/wg0.pub

on ns8

i remove wireguard on ns7 doing this command:

yum remove wireguard-tools.x86_64
yum remove kmod-wireguard.x86_64

And this is the ouput of “locate wg0” on NS7(locate wg0 not find anything but if i do “locate wireguard” found items)
image

on ns8 “locate wg0”
image

“locate wireguard”

/etc/wireguard
/etc/firewalld/services/ns-wireguard.xml
/etc/firewalld/services/ns-wireguard.xml.old
/etc/wireguard/wg0.conf
/usr/lib/firewalld/services/wireguard.xml
/usr/lib/modules/6.1.0-18-amd64/kernel/drivers/net/wireguard
/usr/lib/modules/6.1.0-18-amd64/kernel/drivers/net/wireguard/wireguard.ko
/usr/share/doc/wireguard
/usr/share/doc/wireguard-tools
/usr/share/doc/wireguard/NEWS.Debian.gz
/usr/share/doc/wireguard/TODO.Debian
/usr/share/doc/wireguard/changelog.Debian.gz
/usr/share/doc/wireguard/copyright
/usr/share/doc/wireguard-tools/NEWS.Debian.gz
/usr/share/doc/wireguard-tools/README.Debian
/usr/share/doc/wireguard-tools/changelog.Debian.amd64.gz
/usr/share/doc/wireguard-tools/changelog.Debian.gz
/usr/share/doc/wireguard-tools/copyright
/usr/share/doc/wireguard-tools/examples
/usr/share/doc/wireguard-tools/examples/dns-hatchet
/usr/share/doc/wireguard-tools/examples/embeddable-wg-library
/usr/share/doc/wireguard-tools/examples/extract-handshakes
/usr/share/doc/wireguard-tools/examples/extract-keys
/usr/share/doc/wireguard-tools/examples/highlighter
/usr/share/doc/wireguard-tools/examples/json
/usr/share/doc/wireguard-tools/examples/keygen-html
/usr/share/doc/wireguard-tools/examples/launchd
/usr/share/doc/wireguard-tools/examples/nat-hole-punching
/usr/share/doc/wireguard-tools/examples/ncat-client-server
/usr/share/doc/wireguard-tools/examples/reresolve-dns
/usr/share/doc/wireguard-tools/examples/sticky-sockets
/usr/share/doc/wireguard-tools/examples/synergy
/usr/share/doc/wireguard-tools/examples/dns-hatchet/README
/usr/share/doc/wireguard-tools/examples/dns-hatchet/apply.sh
/usr/share/doc/wireguard-tools/examples/dns-hatchet/hatchet.bash
/usr/share/doc/wireguard-tools/examples/embeddable-wg-library/Makefile
/usr/share/doc/wireguard-tools/examples/embeddable-wg-library/README
/usr/share/doc/wireguard-tools/examples/embeddable-wg-library/test.c
/usr/share/doc/wireguard-tools/examples/embeddable-wg-library/wireguard.c
/usr/share/doc/wireguard-tools/examples/embeddable-wg-library/wireguard.h
/usr/share/doc/wireguard-tools/examples/extract-handshakes/Makefile
/usr/share/doc/wireguard-tools/examples/extract-handshakes/README
/usr/share/doc/wireguard-tools/examples/extract-handshakes/extract-handshakes.sh
/usr/share/doc/wireguard-tools/examples/extract-handshakes/offset-finder.c
/usr/share/doc/wireguard-tools/examples/extract-keys/Makefile
/usr/share/doc/wireguard-tools/examples/extract-keys/README
/usr/share/doc/wireguard-tools/examples/extract-keys/config.c
/usr/share/doc/wireguard-tools/examples/extract-keys/extract-keys.c
/usr/share/doc/wireguard-tools/examples/highlighter/Makefile
/usr/share/doc/wireguard-tools/examples/highlighter/README
/usr/share/doc/wireguard-tools/examples/highlighter/fuzz.c
/usr/share/doc/wireguard-tools/examples/highlighter/gui
/usr/share/doc/wireguard-tools/examples/highlighter/highlight.c
/usr/share/doc/wireguard-tools/examples/highlighter/highlighter.c
/usr/share/doc/wireguard-tools/examples/highlighter/highlighter.h
/usr/share/doc/wireguard-tools/examples/highlighter/gui/highlight.cpp
/usr/share/doc/wireguard-tools/examples/highlighter/gui/highlight.pro
/usr/share/doc/wireguard-tools/examples/json/README
/usr/share/doc/wireguard-tools/examples/json/wg-json
/usr/share/doc/wireguard-tools/examples/keygen-html/README
/usr/share/doc/wireguard-tools/examples/keygen-html/keygen.html
/usr/share/doc/wireguard-tools/examples/keygen-html/wireguard.js
/usr/share/doc/wireguard-tools/examples/launchd/README
/usr/share/doc/wireguard-tools/examples/launchd/com.wireguard.wg0.plist
/usr/share/doc/wireguard-tools/examples/nat-hole-punching/README
/usr/share/doc/wireguard-tools/examples/nat-hole-punching/nat-punch-client.c
/usr/share/doc/wireguard-tools/examples/nat-hole-punching/nat-punch-server.c
/usr/share/doc/wireguard-tools/examples/ncat-client-server/README
/usr/share/doc/wireguard-tools/examples/ncat-client-server/client-quick.sh
/usr/share/doc/wireguard-tools/examples/ncat-client-server/client.sh
/usr/share/doc/wireguard-tools/examples/ncat-client-server/server.sh
/usr/share/doc/wireguard-tools/examples/reresolve-dns/README
/usr/share/doc/wireguard-tools/examples/reresolve-dns/reresolve-dns.sh
/usr/share/doc/wireguard-tools/examples/sticky-sockets/README
/usr/share/doc/wireguard-tools/examples/sticky-sockets/sticky-sockets.c
/usr/share/doc/wireguard-tools/examples/synergy/README
/usr/share/doc/wireguard-tools/examples/synergy/synergy-client.sh
/usr/share/doc/wireguard-tools/examples/synergy/synergy-server.sh
/usr/share/lintian/overrides/wireguard-tools
/var/cache/apt/archives/wireguard-tools_1.0.20210914-1+b1_amd64.deb
/var/cache/apt/archives/wireguard_1.0.20210914-1_all.deb
/var/lib/dpkg/info/wireguard-tools.list
/var/lib/dpkg/info/wireguard-tools.md5sums
/var/lib/dpkg/info/wireguard-tools.postinst
/var/lib/dpkg/info/wireguard-tools.postrm
/var/lib/dpkg/info/wireguard-tools.prerm
/var/lib/dpkg/info/wireguard.list
/var/lib/dpkg/info/wireguard.md5sums

Hi @stephdl i need to delete this file on both ns7 and ns8?

On ns7 but you can say I am fedup of this ns8 and you start again

Hi @stephdl
Hi rename all the file related to wireguard on both ns7 and ns8, reinstall the ns8 migration tool and reconfigure the cluster, i click on “sync data” and it seems goes fine. The other difference i notice is that the container on ns8 changed name in “nextcloud2” instead “nextcloud1”, anyway now i click on “finish migration” and seems container nextcloud on ns8 failed to start because “user already exists.”


After few minutes he give me the same error he gives me the 1st time:

https://www.google.com/search?client=ms-android-samsung-ss&sca_esv=661f6c137278c197&sxsrf=ACQVn0-Bxz7UwYuTlv2ozIZ1228j4LrCjQ:1712126929414&q=nextcloud+user+already+exists.&source=lnms&uds=AMwkrPtf40cQEE8x2HwLs_wcbJ5sDCNQIhcfUMm-xL2I-eUUlVL4190dW-KA8_JoqVmm5iwVcT8mQOzQb-Hy3Ow5D5pSAWEUFRnMmfbS189dW_CsAPNInZLB6-ZYAqKV4ca8JU3m06ub9qBCIrz8ZI7UoVSe82O07FMUk1pmIxyfI1t7Mk0yWAUoW4d5zla6expsDGmlTaNn_06bL9nGeZw_3rRZge8Iq0fJhKnND6aU165Z9XuIu2x_S6fAdlZBWcJNaCSXkbzlYnPyTZRrNvN5Yo0q_0Hg_d46uaUx9l1-o4dz4s7T83ZIwyizLw0Inw2Qecdb0pih&sa=X&ved=2ahUKEwjtocDruaWFAxXXSaQEHWo8B_IQ0pQJegQIERAB&biw=412&bih=810&dpr=2.63

Seems a known error in nextcloud

Yes i read the threads, but have you ever migrated nextcloud from ns7 to ns8 using ns8 migration tool?Did you encounter any problems during the migration too?

Anyway the thread says the need to remove the user “admin” from nextcloud database if i understand correctly doing this:

Check Databases:
SHOW DATABASES;

Select the Database you need to edit:
USE owncloud;

Self explanatory:
SHOW TABLES;

Select all from table oc_users or nc_users if nextcloud:
SELECT * FROM oc_users;

Delete the admin user inside table oc_users or nc_users depending on installation, also deleting from accounts and groups:

DELETE FROM oc_users
where uid = ‘admin’;

DELETE FROM oc_accounts
where user_id = ‘admin’;

DELETE FROM oc_group_user
where gid = ‘admin’;

yes I read it myself, but wait a bit before to break everything

need to try it myself, AFAIK it was workable but we still use the old way to migrate, we do not have the import-module action. Maybe not related but who knows

on todo

Ok so in my case what other procedure can i do for migrate? if with ns8 migration tool i have this errors?

no answer by now, try to dump your self the sql

restore to the state folder /state/restore of the container

trigger the action

do manually each steps and check where is the error

do you have a LDAP on this machine please ?

Hi, yes LDAP
NS7:


NS8:
image

However, if i don’t remember wrong, the first time i used the migration tool, the user error that already exists did not appear to me, probably on ns8 there was some residue left from the previous container also because the synchronization this time complete in around 1 minute and the data on nextcloud they are 380gb more or less, so it means that the data still on ns8 from the first time I did the synchronization, also because the instance now is called “nextcloud2” while the first time it was “nextcloud1”.

we need to evaluate the issue/bug, I can reproduce with a local samba AD

Apr 03 12:21:05 R1-pve.rocky9-pve.org runagent[11737]: wait-startup: waiting for nextcloud-app (57)
Apr 03 12:21:06 R1-pve.rocky9-pve.org nextcloud-app[11715]: Username is invalid because files already exist for this user

cc @davidep

99.99% sure we have something to fix :stuck_out_tongue:

2 Likes

migration log, I think we have also a version mismatch

Ok wait for @davidep and @giacomo sure have the solution :slight_smile:

1 Like

On NS8, Nextcloud startup fails with that endless loop because its version is older than NS7.

I suggest to abort the migration of Nextcloud in NS7 migration tool. Then run the following commands from nethserver-ns8-migration — NethServer 7 documentation

# Nextcloud
rm -rf /etc/e-smith/templates-custom/etc/httpd/conf.d/zz_nextcloud.conf
rm -f /etc/e-smith/templates-custom/etc/httpd/conf.d/default-virtualhost.inc/40nextcloud
signal-event nethserver-nextcloud-update

For a new migration attempt, wait until the NS8 version is aligned to NC 27.1.7: we’re already working on it. The testing version is already available with tag 1.1.6-dev.1.

3 Likes

Hi @davidep thank you for answer.
So for migrate nextcloud at this point one option could be transfer file and folder with rsync?
Or wait the new version of nextcloud on NS8