2

I installed Umbrel on an old PC. I got ahead of myself and did it before I got a new hard drive. My internal hard drive isn't big enough to hold the entire blockchain. I got a new 2Tb external drive, but I can't figure out how to move the data files to the new drive. I'm already 10% synced and don't want to start over :p

Thanks in advance.

Dan Williams
  • 121
  • 1
  • 4
  • I followed guttermonk’s steps but I am getting stuck on step 4. When I open my “docker-compose.yml”, I do not see the entry “- "${APP_BITCOIN_DATA_DIR}:/data/.bitcoin" that needs to be edited. –  Feb 02 '23 at 14:22
  • There are several files called docker-compose.yml so make sure you are in the correct path: ~/umbrel/app-data/bitcoin – guttermonk Mar 01 '23 at 01:33

3 Answers3

1

You move the one data directory to the new drive.

For example with Linux you move the /.bitcoin folder to the new drive with the same path.

stackaccount
  • 352
  • 1
  • 7
0

BLUF: If you plan on installing other apps that use the Bitcoin node as a dependency, this method will not work. Please see my other solution, which I learned about the hard-way.

Assuming you're using a Linux based OS, add your new external 2Tb drive to your fstab so that it automatically mounts on boot. For this example, I set my drive to mount to /mount/umbrel/node but you can use any path you like.

  1. Stop Umbrel:

    cd ~/umbrel
    sudo ./scripts/stop

  2. Go to ~/umbrel/app-data/ and copy the bitcoin folder to your new drive.

  3. Give umbrel permission to write to this folder: sudo chown -R umbrel /mount/umbrel/node/bitcoin

  4. Go back to ~/umbrel/app-data/bitcoin and make a backup copy of the docker-compose.yml file.

  5. Open the original docker-compose.yml and replace the line under "Volumes:" that says:

    - "${APP_BITCOIN_DATA_DIR}:/data/.bitcoin"

With (making sure not to change the spacing/formating in the yml file):

- /mount/umbrel/node/bitcoin:/data/.bitcoin
Devices:
- /dev/sdb1:/dev/sdb1
6. Restart your device, and your node should start syncing to your external drive.

If everything is working and you're sure it's writing to your new drive...

  1. Optionally, if you want to save space on your old drive, you can go to ~/umbrel/app-data/bitcoin/data/bitcoin and delete any folders taking a lot of space.

I referenced these old instructions. If you found this helpful, please consider an up-vote or send some sats to: guttermonk@getalby.com

Cheers!

guttermonk
  • 101
  • 4
0

The better solution, at least for me, was to move your whole Umbrel install to your external drive. This is more resilient across upgrades to the Bitcoin app, and you won't run into any linking issues with apps that use the Bitcoin app as a dependency.

First, make sure your Umbrel instance is stopped:

cd ~/umbrel
sudo ./scripts/stop

Backup your Umbrel folder first (you can delete later):

sudo cp /home/umbrel/umbrel /home/umbrel/umbrel-DELETE -r

Move your install to your external drive:

sudo mv /home/umbrel/umbrel /media/umbrel/node/umbrel -r

Create a soft-link between the original filename and the link name - kind of like a shortcut in Windows:

sudo ln -s /media/umbrel/node/umbrel /home/umbrel/umbrel

That's it. Again - If you found this helpful, please consider an up-vote or send some sats to: guttermonk@getalby.com

Thank you. Stay happy. Zap sats.

guttermonk
  • 101
  • 4