Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: fmirg21 on June 07, 2018, 11:05:23 AM



Title: Transfer a btc full node to another server
Post by: fmirg21 on June 07, 2018, 11:05:23 AM
I want to transfer my btcd full node to a different server.
Since btcd takes ages to sync, I want to copy the blockchain I already have and start syncing again once its transferred.
Is this possible? Do I have to keep the same directories structure?


Title: Re: Transfer a btc full node to another server
Post by: ranochigo on June 07, 2018, 11:09:45 AM
Its possible. The data structure for every OS is the same, AFAIK.

Just install the client as how you would usually do. You can either copy the entire data directory to the default data directory or to a different directory. For OS with UI, the client will prompt you to select a data directory if it doesn't detect it in the default directory. You can always point your client to the directory in the conf file or at startup.


Title: Re: Transfer a btc full node to another server
Post by: fmirg21 on June 07, 2018, 12:05:16 PM
Its possible. The data structure for every OS is the same, AFAIK.

Just install the client as how you would usually do. You can either copy the entire data directory to the default data directory or to a different directory. For OS with UI, the client will prompt you to select a data directory if it doesn't detect it in the default directory. You can always point your client to the directory in the conf file or at startup.

I specified a different --datadir to save the blockchain so it is not saved on ~./btcd but on another path. What I meant by data structure was PATHs, sorry for confusion.

Ok thanks for the answer.

BTW do you know why btcd takes that much in syncing from the beginning? Last time it took more than a week


Title: Re: Transfer a btc full node to another server
Post by: NeuroticFish on June 07, 2018, 12:12:55 PM
Even if the path structure doesn't match, you can make a symlink. It can be done on Windoze, I'm sure other OSes also have that.

About taking that long - it gets data from various nodes so the download is not continuous, also it has to "crunch" that data (check validity and probably other operations too). And I think that's over 150GB of data.


Title: Re: Transfer a btc full node to another server
Post by: mocacinno on June 07, 2018, 12:15:41 PM
Even if the path structure doesn't match, you can make a symlink. It can be done on Windoze, I'm sure other OSes also have that.

About taking that long - it gets data from various nodes so the download is not continuous, also it has to "crunch" that data (check validity and probably other operations too). And I think that's over 150GB of data.


symlink in *nix is called a softlink..
ln -s

as for the sync speed: OP is talking about btcd. In my experience, btcd is a lot slower than bitcoin core when it comes to syncing (i'm currently close to giving up syncing my own btcd node and switching back to bitcoind, since my node has been syncing for 2+ weeks now).
IIRC correctly, it has something to do with the fact that btcd doesn't multithread it's sync process... When i noticed the slow sync speed, i remember i found the rationale behind the slow sync speed somewhere on a github ticket, i'm just to lazy to try to search the ticket again :)


Title: Re: Transfer a btc full node to another server
Post by: fmirg21 on June 07, 2018, 12:56:54 PM
Even if the path structure doesn't match, you can make a symlink. It can be done on Windoze, I'm sure other OSes also have that.

About taking that long - it gets data from various nodes so the download is not continuous, also it has to "crunch" that data (check validity and probably other operations too). And I think that's over 150GB of data.


symlink in *nix is called a softlink..
ln -s

as for the sync speed: OP is talking about btcd. In my experience, btcd is a lot slower than bitcoin core when it comes to syncing (i'm currently close to giving up syncing my own btcd node and switching back to bitcoind, since my node has been syncing for 2+ weeks now).
IIRC correctly, it has something to do with the fact that btcd doesn't multithread it's sync process... When i noticed the slow sync speed, i remember i found the rationale behind the slow sync speed somewhere on a github ticket, i'm just to lazy to try to search the ticket again :)


Yeah I was referring to btcd, it is much slower, two months ago, when I installed my node it took almost one month to sync the whole blockchain, that just doesn't make any sense. Mighty Roasbeef told me it is because btcd has less caching. But still, it takes ages...


Title: Re: Transfer a btc full node to another server
Post by: btj on June 07, 2018, 10:47:34 PM
The best solution for you, is to install btcd in the new OS.

In the other hand, install apache server or nginx in your node server, zip data folder of your bitcoin node, move zipped file to /var/www/html/ or the default path where you are able to access it from the web: http://YOUR_IP/zipped_file.zip.

Once done, go to your new server, and download it using wget command or any similar one like CURL etc...

Quote
wget http://YOUR_IP/zipped_file.zip

And extract it and point btcd to your new data folder.


Title: Re: Transfer a btc full node to another server
Post by: mocacinno on June 08, 2018, 05:32:08 AM
The best solution for you, is to install btcd in the new OS.

In the other hand, install apache server or nginx in your node server, zip data folder of your bitcoin node, move zipped file to /var/www/html/ or the default path where you are able to access it from the web: http://YOUR_IP/zipped_file.zip.

Once done, go to your new server, and download it using wget command or any similar one like CURL etc...

Quote
wget http://YOUR_IP/zipped_file.zip

And extract it and point btcd to your new data folder.

Why wouldn't you just use scp to move files between systems instead of having to install a server daemon? Sure, the speed might be a little lower, but i'm pretty sure this time difference would be compensated by not having to configure a web server...