Migrating users from server A to server B

Questions about WAPT Server / Requests and help related to the WAPT server
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
Dawn
Messages: 3
Registration: Sep 10, 2019 - 11:24

September 10, 2019 - 4:16 PM

Hello,
We currently have an architecture with two WAPT servers. The first (let's call it A) manages one website, and the second (B) manages several.
We want to migrate the users from server A to server B.

- WAPT version: 1.7.4
- Server OS: Windows
- Administration machine OS: Windows 10

We have tried:
- Manually, by modifying wapt-get.ini. This sometimes worked, but the certificates regularly caused problems.
- Manually installing the new agent (connected to the correct server) over the old one. This worked about half the time.
- Creating a GPO to deploy waptdeploy.exe via script, with the appropriate settings. This works, but requires the workstations to update their Group Policy and then restart.

Is there a method to migrate, for example, 5 workstations at a time? Are the methods we are currently using the correct ones?
Thank you in advance.
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

September 16, 2019 - 6:29 PM

Hello

, could you please clarify your needs?
There are many ways to migrate, for various uses.

You can choose to keep the certificates or not.
It also depends on your current configuration, HTTPS certificate verification, prefix, etc.

Could you please outline the context of your "migration"?
Dawn
Messages: 3
Registration: Sep 10, 2019 - 11:24

September 17, 2019 - 11:37

Hello, and thank you for your reply.

We want to centralize all our sites on a single server, rather than having them spread across different servers. Currently, we have workstations connecting to several WAPT servers, and we ultimately want them to connect to only one, by "migrating" them from server A (mentioned earlier) to server B, which will then be connected to all the workstations.

Currently, we migrate them via Group Policy Objects (GPO), with a script that runs waptdeploy when the machines start up and shut down. The problem is that we can't track the workstations throughout the building to restart them, since some users don't shut them down. We are therefore looking for another way to migrate the workstations, perhaps by batching them, which would allow us to select groups of workstations to migrate and thus control the transfer to the new server, without waiting for action from our users.

Regarding the certificates, they are replaced during the new installation.

Regarding prefixes, we're also looking into that: since there's a prefix change from one server to another (which isn't always consistent), we were wondering how to link the new packages to the old ones and remove the latter, more easily than manually.

Thanks in advance!
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

September 17, 2019 - 12:30

Aurore wrote: September 17, 2019 - 11:37 AM Hello, and thank you for your reply.

We want to centralize all our sites on a single server, rather than having them spread across different servers. Currently, we have workstations connecting to several WAPT servers. Ultimately, we want them to connect to only one, by "migrating" them from server A (mentioned earlier) to server B, which will then be connected to all the workstations.

Currently, we migrate them via GPO, with a script that runs waptdeploy when the machines start up and shut down. The problem is that we can't track the workstations throughout the building to restart them, since some users don't shut them down. Therefore, we are looking for another way to migrate the workstations, for example, by batching them. This would allow us to select groups of workstations to migrate and thus control the transfer to the new server, without waiting for action from our users.
Absolutely, it's possible; the method is to create a package that generates a scheduled task at hour ° 2 minutes.

That's exactly what the waptupgrade package does:
https://github.com/tranquilit/WAPT/blob ... up.py#L259
Aurore wrote: Sep 17, 2019 - 11:37 AM Regarding the certificates, they are replaced during the new installation.

We are also looking into the prefixes: since there is a prefix change from one server to another (which isn't necessarily consistent), we were wondering how to link the new packages to the old ones and remove the latter, more easily than manually.

Thank you in advance!
A package like this could work to forget the old package and reinstall the new one with the same name:

Code: Select all

def install():
    oldprefix = 'tis-'
    newpefix = 'toto-'
    for p in list(WAPT.list()): 
        if p.package.startswith(oldprefix):
            try:
                WAPT.install(newpefix + p.package.split(oldprefix,1)[1])
            except:
                pass
            WAPT.forget_packages(p.package)
Dawn
Messages: 3
Registration: Sep 10, 2019 - 11:24

September 17, 2019 - 3:49 PM

I tried migrating the workstations using WaptUpgrade, but we're encountering a problem with some workstations, regardless of the method: the new agent installs correctly, but the client doesn't register with the server. The client can retrieve packages from the repository, but the server doesn't see it. If the client isn't already in the database, it doesn't appear at all.
Even manually installing the agent doesn't solve the problem.

A `wapt-get register` command works, but it doesn't make the workstation appear. I tried by following a runwaptservice, which returns the following errors:
"
WARNING Websocket connect params: Unable to get auth token: Error on server:
EWaptAuthentificationFailure(u'Unknown host UUID [...]. Please register first.',)
"
then:
"
WARNING Host on the server is not known under this FQDN name (Known as None). Trying to register...
CRITICAL Error on the server:
NameError("global name 'EWaptCryptoException' is not defined",)
CRITICAL Unable to update server status: Error on server:
NameError("global name 'EWaptCryptoException' is not defined",)
"
Then the error:
"
WARNING Websocket connect params: Unable to get auth token: Error on server:
EWaptAuthentificationFailure(u'Unknown host UUID [...]. Please register first.',)
"
Repeating over and over again. I've searched the forums but haven't found any solutions, and I'm out of ideas myself.
Thanks in advance
Locked