Porting to new server

Hello,

I am using Mender to manage 10 Raspberry Pis. I have to port the Pis to a new management server because the older server will not be available to me. I set up a new management server with new certificate keys and created an artifact to deploy to the Pis from the old server. The Pis did reach the new server and I approved them. But they soon rollbacked to the old artifact because the old server thought the deployment failed. Please advise me how I can finish the server switching. Any suggestion will be appreciated!

Fortunately found this thread that works for me via SSH
Migrating a device from one Mender server to another.

Thank OP and mirzak for providing the scheme.

Still curious whether the server switch can be done through deployment.

Have you tried deleting the files in the linked article as part of an update script packaged in the deployment artifact?

Also note that there are less invasive ways of migrating.

You are able to configure multiple servers on the client side using the Servers configuration option, more on it here,

https://docs.mender.io/1.7/client-configuration/configuration-file/configuration-options#servers

And if one migrates authentication data between servers the migration should be more seamless. There are plans on improving this workflow by providing more tooling or documentation but we are not there yet.

I recently migrated to a new server. What I did was just point the DNS to the new server, and I could adopt the devices there.

That is interesting @mterwoord. If you are able to share more details about the procedure I am sure that it will be helpful to the community.

My situation was, that I had a “test” setup with 4-5 devices in it. I had to visit those 5 devices to reflash anyway, so I started setting up the production environment. New server, new images, etc. At some point i switched over my dns entry to the new server, andsuddenly the old devices appeared there. Not really more involved… The moment the old devices hit the new server it worked…

This is a good idea. Let me try it out and update here.

Multiple server configuration is a very good concept. Will check how it works. Thanks!

This is the way I practically prefer. Thanks for proving its feasibility. I am actually asking my IT manager to let me keep the old server domain as an alias of my new server. By doing this I won’t have to do any porting. It may not always work though, depending on how much my manager likes me. :grinning: