# Migrating a device from one Mender server to another

**URL:** <https://hub.mender.io/t/migrating-a-device-from-one-mender-server-to-another/438>\
**Category:** General Discussions\
**Tags:** yocto, nxp\
**Created:** [April 2, 2019, 11:30am UTC](https://hub.mender.io/t/migrating-a-device-from-one-mender-server-to-another/438 "2019-04-02T11:30:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shakeel](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@shakeel](https://hub.mender.io/u/shakeel)\
**Post date:** [April 2, 2019, 11:30am UTC](https://hub.mender.io/t/migrating-a-device-from-one-mender-server-to-another/438/1 "2019-04-02T11:30:02Z")

</div>

Hi,

We were using an instance of Mender server and the devices were getting updated successfully. Now we need to use another Mender server with a different IP and certificate. We have decommissioned the devices from the old server, updated Mender Server URL in mender.conf and placed new server.crt in /etc/mender/.

Now when the device boots up it goes directly to update-check state and do not check authorization status. There is a following message in the log:

INFO[0054] authorization data present and valid, skipping authorization attempt module=mender

Is there a way to reset state on Mender client side so that it starts behaving a new device and sends an authorization request to the new server first? Any other way to achieve this?

Best Regards,  
Shakeel

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [April 2, 2019, 11:38am UTC](https://hub.mender.io/t/migrating-a-device-from-one-mender-server-to-another/438/2 "2019-04-02T11:38:13Z")

</div>

Hi @shakeel and welcome to Mender Hub.

You can use the `mender -bootstrap` to force the client to re-do the authorization. Will that work for you?

---

<div class="post-metadata">

**Author:** ![shakeel](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@shakeel](https://hub.mender.io/u/shakeel)\
**Post date:** [April 2, 2019, 11:43am UTC](https://hub.mender.io/t/migrating-a-device-from-one-mender-server-to-another/438/3 "2019-04-02T11:43:36Z")

</div>

> [@mirzak](#):
>
> mender -bootstrap

Hi @mirzak

Thanks for your message.

I have already tried `mender -bootstrap` and `mender -forcebootstrap -bootstrap` but I still see the following message:

```
INFO[0000] Issuer: [], Valid from: 2019-03-05 14:38:58 +0000 UTC, Valid to: 2029-03-02 14:38:58 +0000 UTC module=client
INFO[0000] authorization data present and valid, skipping authorization attempt module=mender

```

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [April 2, 2019, 11:45am UTC](https://hub.mender.io/t/migrating-a-device-from-one-mender-server-to-another/438/4 "2019-04-02T11:45:51Z")

</div>

Ok, if you really want to clean-up all state from the device you can also delete the following files:

```auto
/data/mender/mender-store
/data/mender/mender-store-lock
/data/mender/mender-agent.pem

```

Doing this should re-present a “new” device.

---

<div class="post-metadata">

**Author:** ![shakeel](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@shakeel](https://hub.mender.io/u/shakeel)\
**Post date:** [April 2, 2019, 11:56am UTC](https://hub.mender.io/t/migrating-a-device-from-one-mender-server-to-another/438/5 "2019-04-02T11:56:30Z")

</div>

Thanks @mirzak deleting these three files has solved the problem for me.

Best Regards,  
Shakeel
