Author

Topic: Transferring Bitcoin Blockchain from old drive to a new one (Read 182 times)

legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
Using scp How long did it take you to transfer the blockchain files to another machine?
In my experience, scp is slower because it needs some time between files, and can't use compression. But for 100 MB files that won't compress much it shouldn't matter much.
I had to look it up, it turns out both rsync and scp can use compression nowadays.
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook

It requires the use of another strorage drive or some ssh connection to another machine to transfer data but that's the idea
I hope this can help others looking to avoid downloading the full blockchain again

Using scp How long did it take you to transfer the blockchain files to another machine?

According to the link I provided above it would take too long compared to using rsync instead of using scp.
I hope you are not waiting until now to finish transferring blockchain data.
hero member
Activity: 714
Merit: 1010
Crypto Swap Exchange
It requires the use of another strorage drive or some ssh connection to another machine to transfer data but that's the idea
I hope this can help others looking to avoid downloading the full blockchain again

A Raspi 4B doesn't have enough power budget for its USB interfaces to operate a second HDD or SSD storage device (total max. power budget for all USB connectors together is ~1.2A or ~6W; that's just enough for one SSD or HDD drive). It would only work if at least one of the USB3-SATA-adapters had an own power supply for the connected storage drive or using a sufficiently powered USB-hub.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
scp -r @:/path/to/bitcoin/blocks /path/to/local/Downloads
scp -r @:/path/to/bitcoin/chainstate /path/to/local/Downloads
scp -r @:/path/to/bitcoin/indexes /path/to/local/Downloads
I'd shorten these 3 lines to:
Code:
scp -r @:/path/to/.bitcoin /path/to/local/Downloads
My Bitcoin Core installation doesn't have a directory "indexes".

Quote
It requires the use of another strorage drive or some ssh connection to another machine to transfer data but that's the idea
But: if you have to ask how to copy files on your local system, I can't really recommend using with SSH.
newbie
Activity: 9
Merit: 3
Thank you guys for your inputs   Smiley

I also got this from someone :

scp -r @:/path/to/bitcoin/blocks /path/to/local/Downloads
scp -r @:/path/to/bitcoin/chainstate /path/to/local/Downloads
scp -r @:/path/to/bitcoin/indexes /path/to/local/Downloads

It requires the use of another strorage drive or some ssh connection to another machine to transfer data but that's the idea
I hope this can help others looking to avoid downloading the full blockchain again
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
Did you boot the Umbrel OS on the external drive? Just asking this because you said you don't want to format the hard drive.

Why not buy an SD card instead to install OS 64 GB SD card would be enough and use the hard drive as your external drive and set up Bitcoin core then point it to the external drive where your Bitcoin folder is located.
I think you can find the Bitcoin data from the hard drive in the directory below.

Code:
/home/umbrel/umbrel/bitcoin

Or check this link below you might get some ideas and suggestions on how to backup/copy the blockchain data.
-  https://github.com/getumbrel/umbrel-os/issues/119#issuecomment-774775026
hero member
Activity: 714
Merit: 1298
how can I avoid formatting the hard drive and lose all the BTC blockchain I downloaded,

The easiest way  to avoid HDD formatting is to install new OS on fresh drive, preferably SSD, and then copy Bitcoin Core data from  /umbrel/bitcoin/ to new  directory you assign for bitcoin,  Sure such approach involves some extra expenses to buy new SSD but the pros of it are obvious - you will have a backup ( on your old drive) of blockchain. It will  help resolve  problems if  LevelDB files get corrupted ( for some reason) on you main SSD drive.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
I don't know Umbrel, but usually you'd just copy your home directory to the new system. Create a backup and restore the data.

If you want to keep switching OS without reformatting, it's easiest to keep /home on a separate partition (but I guess it's too late for that now).
If you don't want to create a backup, and don't want to format, you can YOLO and manually remove all files other than your home directory after you boot the installation disk for your new OS, and then install without formatting.
newbie
Activity: 9
Merit: 3
Hello
I was testing Umbrel as I want to start learning how to run my Lightning network. I installed Umbrel on my Raspberry Pi4 and downloaded the BTC blockchain.
I have been running into few issues of stability with Umbrel and I am thinking of moving to another OS (it is part of the testing and learning)

So my question is how can I avoid formatting the hard drive and lose all the BTC blockchain I downloaded, if anyone has a procedure on how to back up the chain and copying it to a new OS install, that would be great!  Smiley

I tried to look for some guides but couldn't find a step by step one

Thanks for reading me...
Jump to: