Moving node to another system

Hi,

I was wondering if it is possible to move a node from one system to another.

In this case it is a main- and testnet node, currently running on Ubuntu, that I would like to move to a Windows system instead.
The mainnet node is also a baker.

If this is possible, what is needed to make this work please?

Hi! Yes, it’s possible. You can manually transfer some directories from the old server to the new one and you don’t have to wait again for synchronization or import accounts.

So, the first thing I would do is move the blockchain database itself to the new server. Probably the best way to do this is to stop your node and create an archive of the database, then move the archive to the new server and extract. The database for mainnet is located at /var/lib/concordium-9dd9ca4d19e9393877d2c44b70f89acbfc0883c2243e5eeaecc0d1cd0503f478/data/database-v4
In fact, we archive the treestate-x directories and the blockstate-x.dat files into 1 archive

While the archive is being created, install concordium-node on your new windows server. During the installation process, you will be able to choose whether or not to run the node immediately after the installation is complete. Leave all the checkboxes as they are. When the installation is complete, check your node on the dashboard and stop node via the start menu.
Extract the archive to your new server (in your case, a Windows server) to C:\ProgramData\Concordium\Node Runner\mainnet\data\database-v4 (you should overwrite automatically created treestate-0 and blockstate-0.dat)
After extracting, this directory should contain the treestate-x directories and the blockstate-x.dat files.

After that it is worth migrating the accounts. It is done in the same way - you just copy the directory .config/concordium/accounts and paste it to C:\Users\%USERNAME%\AppData\Roaming\concordium\accounts

The last thing to do is to move the baker keys and edit the config file in windows. Move baker-credentials.json to a directory on the new windserver, for example c:\concordium\baker-credentials.json
Then change the file nodes.toml - in the mainnet section add a new line with the value
baker_credentials = 'c:\concordium\baker-credentials.json’

After that you should be able to run a fully synchronized baker node with all your accounts. :slightly_smiling_face: