<p>You move the one data directory to the new drive.</p>
<p><a href="https://github.com/bitcoin/bitcoin/blob/master/doc/files.md#data-directory-location" rel="nofollow noreferrer">For example with Linux</a> you move the /.bitcoin folder to the new drive with the same path.</p>

CC BY-SA 4.0
2021-07-07T21:53:47.530Z
2021-07-07T22:01:16.460Z
2021-07-07T22:01:16.460Z
stackaccount
<p>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.</p>
<p>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 <code>/mount/umbrel/node</code> but you can use any path you like.</p>
<ol>
<li><p>Stop Umbrel:</p>
<p><code>cd ~/umbrel</code><br />
<code>sudo ./scripts/stop</code></p>
</li>
<li><p>Go to <code>~/umbrel/app-data/</code> and copy the bitcoin folder to your new drive.</p>
</li>
<li><p>Give umbrel permission to write to this folder: <code>sudo chown -R umbrel /mount/umbrel/node/bitcoin</code></p>
</li>
<li><p>Go back to <code>~/umbrel/app-data/bitcoin</code> and make a backup copy of the docker-compose.yml file.</p>
</li>
<li><p>Open the original docker-compose.yml and replace the line under &quot;Volumes:&quot; that says:</p>
<p><code>  - &quot;${APP_BITCOIN_DATA_DIR}:/data/.bitcoin&quot;</code></p>
</li>
</ol>
<p>With (making sure not to change the spacing/formating in the yml file):</p>
<blockquote>
<p><code>  - /mount/umbrel/node/bitcoin:/data/.bitcoin</code><br />
<code>Devices:</code><br />
<code>  - /dev/sdb1:/dev/sdb1</code><br />
6. Restart your device, and your node should start syncing to your external drive.</p>
</blockquote>
<p><strong>If everything is working and you're sure it's writing to your new drive...</strong></p>
<ol start="7">
<li>Optionally, if you want to save space on your old drive, you can go to <code>~/umbrel/app-data/bitcoin/data/bitcoin</code> and delete any folders taking a lot of space.</li>
</ol>
<p>I referenced <a href="https://medium.com/coinmonks/migrating-umbrel-bitcoin-blocks-to-external-storage-a886821d2b3e" rel="nofollow noreferrer">these old instructions</a>. If you found this helpful, please consider an up-vote or send some sats to: guttermonk@getalby.com</p>
<p>Cheers!</p>

CC BY-SA 4.0
2022-09-15T17:08:04.903Z
2023-03-22T01:01:28.870Z
2023-03-22T01:01:28.870Z
guttermonk
<p>In order to work with others apps like Electrs, it's better to do this:</p>
<p>Following the first guttermonk answer:</p>
<ul>
<li>Steps 1, 2 and 3 are the same</li>
<li>In step 4 folder, open file <code>exports.sh</code></li>
<li>Modify the line <code>export APP_BITCOIN_DATA_DIR= ##&quot;${EXPORTS_APP_DIR}/data/bitcoin&quot;</code>
<ul>
<li>To <code>export APP_BITCOIN_DATA_DIR=&quot;/mount/umbrel/node/bitcoin&quot;</code></li>
</ul>
</li>
</ul>
<p>Those steps are only valid for the <code>~/umbrel/app-data/bitcoin/data/bitcoin</code> folder. That folder is the one contains the blockchain</p>

CC BY-SA 4.0
2023-12-01T22:20:35.427Z
2023-12-01T22:45:14.557Z
2023-12-01T22:45:14.557Z
bercianor
<p>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.</p>
<p>First, make sure your Umbrel instance is stopped:</p>
<pre><code>cd ~/umbrel
sudo ./scripts/stop
</code></pre>
<p>Backup your Umbrel folder first (you can delete later):</p>
<pre><code>sudo cp /home/umbrel/umbrel /home/umbrel/umbrel-DELETE -r
</code></pre>
<p>Move your install to your external drive:</p>
<pre><code>sudo mv /home/umbrel/umbrel /media/umbrel/node/umbrel -r
</code></pre>
<p>Create a soft-link between the original filename and the link name - kind of like a shortcut in Windows:</p>
<pre><code>sudo ln -s /media/umbrel/node/umbrel /home/umbrel/umbrel
</code></pre>
<p>That's it. Again - If you found this helpful, please consider an up-vote or send some sats to: guttermonk@getalby.com</p>
<p>Thank you. Stay happy. Zap sats.</p>

CC BY-SA 4.0
2023-03-22T01:50:07.590Z
2023-03-22T01:50:07.590Z
guttermonk
<p>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</p>
<p>Thanks in advance.</p>

CC BY-SA 4.0
2023-03-01T01:33:14.580Z
There are several files called docker-compose.yml so make sure you are in the correct path: ~/umbrel/app-data/bitcoin
guttermonk
<umbrel>
Moving the Umbrel Bitcoin database to a new drive
Dan Williams
# Moving the Umbrel Bitcoin database to a new drive

(Asked by: username_0 on 2021-07-07)

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.

**Tags:** umbrel

> **Comments:**
> **username_1**: There are several files called docker-compose.yml so make sure you are in the correct path: ~/umbrel/app-data/bitcoin  

---

## 4 answers

### Answer by username_2 on 2021-07-07. Score: 1

You move the one data directory to the new drive.

[For example with Linux](https://github.com/bitcoin/bitcoin/blob/master/doc/files.md#data-directory-location) you move the /.bitcoin folder to the new drive with the same path.


---

### Answer by username_1 on 2022-09-15. Score: 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...**

7. 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](https://medium.com/coinmonks/migrating-umbrel-bitcoin-blocks-to-external-storage-a886821d2b3e). If you found this helpful, please consider an up-vote or send some sats to: username_1@getalby.com

Cheers!


---

### Answer by username_3 on 2023-12-01. Score: 0

In order to work with others apps like Electrs, it's better to do this:

Following the first username_1 answer:

* Steps 1, 2 and 3 are the same
* In step 4 folder, open file `exports.sh`
* Modify the line `export APP_BITCOIN_DATA_DIR= ##"${EXPORTS_APP_DIR}/data/bitcoin"`
  + To `export APP_BITCOIN_DATA_DIR="/mount/umbrel/node/bitcoin"`

Those steps are only valid for the `~/umbrel/app-data/bitcoin/data/bitcoin` folder. That folder is the one contains the blockchain


---

### Answer by username_1 on 2023-03-22. Score: 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: username_1@getalby.com

Thank you. Stay happy. Zap sats.


---

