getumbrel / umbrel-os

umbrelOS for Raspberry Pi 4 (only). Covert your Raspberry Pi into a home server in one click. For other hardware, checkout https://github.com/getumbrel/umbrel

Home Page:https://umbrel.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Copy an existing Bitcoin blockchain to a new Umbrel Pi

Dar1Theory opened this issue · comments

Notes: Raspberry PI4 with 4G, hardwire network, 1T SSD USB3.0 cables.

Noob here (LN wise, 40 years in tech, networking, systems). I've been following this concept for a couple weeks now.

I followed all the help out there for copying an existing blockchain onto the umbrel and getting it to accept the data. Nothing worked.
However, I was able to get a full copy of the blockchain to be accepted by umbrel.

Here's how:

I've got a bitcoin node running on my mac. It's up to date.
Since the formatting of the ssd's are EXT4, neither my mac nor my parallels PC would read them. Parallels has an "instant install" for ubuntu so I created a minimal ubuntu VM. (took about 10 minutes)

Then, I could see the BTC Core blockchain on my mac and copy it to my Umbrel SSD.

So, I did.

first try: I copied blocks and chanstate directories to the newly initialized SSD. Turned on the pi and waited. Nothing happened local.umbrel browser said "synced" but I got nothing. ssh'd in and read through the bitcoin log and it appeared that it was indexing.
I also got messages that the indexes were larger/smaller than the block count... But after 24 hours, there was really no progress. I decided that it might be better just to let it do the core download... Stopped and reset my thinking.
BTW, I was getting the same errors as were described the other messages (119 and 185 I think) Things like, need to reindex, No file found, Can't read...

So, I looked through my active node on my mac and tried to figure out the differences. The only thing that jumped out at me was that the indexes were actually the "big" files there 17,000+ entries. So, i figured, "why not". I turned off bitcoin core on the mac and then recopied the folders: blocks, chainstate, and indexes.
It took about 3 hours total.

When I plugged in the newly refreshed drive, umbrel popped up with no whining.
It immediately started downloading the final 15 or so blocks that I was missing. Within 3-4 minutes it was telling me which blocks it was validating. 30 minutes later it reported 100% and that I was up and running.
LND was also ready to go.
Now it was asking for a wallet so it could start setting up channels. I'm loving this.

So, I'm not sure if there is a long-term effect of loading the indexes too. Having dealt with DB's a lot, copying indexes is always a little iffy. But this definitely worked for me.
Maybe that is what we were missing...

YMMV, maybe give it a try...