Migrating your node
Node migration from one device to another
Migrating a currently running node to a different machine is a fairly straightforward process which consists of two steps:
- Installing a node in your new machine
- Copying your previuos node data-dir in to your new node.
To install a node on a new machine please follow our initial set up tutorials for linux, raspberry or docker.
Finding data-dir in docker node (Linux host)
When creating a docker node we recommend you create one using a volume flag for the data-dir for example: -v myst-data:/var/lib/mysterium-node. Using volumes is how you store data in a Dockerized application, so it survives beyond the life of a container. You run your myst node container with a volume for the data files. When you replace your container from a new image (to deploy an update), you use the same volume, and the new container has all the data from the original container. If you followed our docker instructions then your data-dir is the directory given when creating the volume (in the example case its myst-data).
You can also find it by executing:
And locating the Binds:
If you cannot find it or you didn't create a volume for the data dir, you will have to exec in to the docker container and follow our linux/raspberry instructions on how to retrieve it.
Finding data-dir in dockerized node (MacOS host)
When using Docker Desktop for MacOS, the containers and all data are stored within the Linux VM. Since the new version of Docker (mine is 20.10.7) uses socket instead of TTY to communicate with the VM, we will use the NC command and open the debug shell socket to interact with the virtual machine:
Find your data directory (keystore, testnet2 folders & nodeui-pass file):
Note! As of July 2021, Docker Desktop for Mac has announced that users will be able to access volumes directly from the GUI, but only with Pro and Team accounts.
Finding data-dir in dockerized node (Windows host)
By running docker inspect <container-name> you will see that there is a mount point listed for the volume:
The source location of the mount shows the physical path on the Docker host where the files for the volume are written - in C:\Users\your-user\.mysterium-node. Navigate to the source path where the Mysterium node files are located & migrate the content in to your new node.
Finding data-dir in linux/raspberry node
With the node service running you can execute:
Output should be similar to data-dir: DIR where DIR is actual directory on your machine where node holds files and directories we need to move.
Migrating to a docker node
Simply copy your previuos data-dir directory somewhere on your new machine and follow our docker set up guide replacing the -v flag in the guide with: -v YOUR_COPIED_DATA_DIR_PATH:/var/lib/mysterium-node.
Migrating to a linux/raspberry node
After installing a new node on linux or raspberry locate the directory where it's trying to read required data from by running:
Stop the currently running node by executing:
And replace the current data-dir together with its innards with the one you copied from the past node setup. After that restart the node:
In case you're migrating from a non linux node you'll have to transfer the ownership of files and folders inside the data-dir by running:
Claiming back your node
Once the node migration (set up with backed up identity) is completed and the service is up and running, you must claim your node back to mystnodes.com. Navigate to the Mystnodes.com/me, copy the API key and add it in the NodeUI settings (Mystnodes.com integration).