# Command for Reindex Blockchain

**URL:** <https://community.umbrel.com/t/command-for-reindex-blockchain/15873>\
**Category:** Support and Troubleshooting\
**Created:** [March 26, 2024, 10:29pm UTC](https://community.umbrel.com/t/command-for-reindex-blockchain/15873 "2024-03-26T22:29:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tgm3d](https://avatars.discourse-cdn.com/v4/letter/t/2bfe46/32.png) [@tgm3d](https://community.umbrel.com/u/tgm3d)\
**Post date:** [March 26, 2024, 10:29pm UTC](https://community.umbrel.com/t/command-for-reindex-blockchain/15873/1 "2024-03-26T22:29:33Z")

</div>

My Umbrel has been out for over a week now. First the update deleted the SSD, now everything is new and now it stops when the blockchain backup is imported.

What is the command to get to the container and recover BTC individually with “-reindex”?

-03-26T22:28:22Z Fatal LevelDB error: Corruption: CURRENT points to a non-existent file: NotFound: /data/.bitcoin/blocks/index/MANIFEST-001899: No such file or directory  
bitcoin\_bitcoind\_1 | 2024-03-26T22:28:22Z You can use -debug=leveldb to get more complete diagnostic messages  
bitcoin\_bitcoind\_1 | : Error opening block database.  
bitcoin\_bitcoind\_1 | 2024-03-26T22:28:22Z Fatal LevelDB error: Corruption: CURRENT points to a non-existent file: NotFound: /data/.bitcoin/blocks/index/MANIFEST-001899: No such file or directory  
bitcoin\_bitcoind\_1 | 2024-03-26T22:28:22Z : Error opening block database.  
bitcoin\_bitcoind\_1 | Please restart with -reindex or -reindex-chainstate to recover.  
bitcoin\_bitcoind\_1 | 2024-03-26T22:28:22Z Aborted block database rebuild. Exiting.  
bitcoin\_bitcoind\_1 | Please restart with -reindex or -reindex-chainstate to recover.  
bitcoin\_bitcoind\_1 | 2024-03-26T22:28:22Z Shutdown: In progress…  
bitcoin\_bitcoind\_1 | 2024-03-26T22:28:22Z scheduler thread exit  
bitcoin\_bitcoind\_1 | 2024-03-26T22:28:22Z Flushed fee estimates to fee\_estimates.dat.  
bitcoin\_bitcoind\_1 | 2024-03-26T22:28:22Z Shutdown: done

---

<div class="post-metadata">

**Author:** ![5tubb0rn](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/5tubb0rn/32/6152_2.png) [@5tubb0rn](https://community.umbrel.com/u/5tubb0rn)\
**Post date:** [May 6, 2024, 2:44pm UTC](https://community.umbrel.com/t/command-for-reindex-blockchain/15873/2 "2024-05-06T14:44:19Z")

</div>

To reindex block umbrel, you can follow these steps:

- Stop the Umbrel service to prevent any further writes to the database.
- Copy only the blocks and chainstate files from your full node to the Umbrel node. Do not copy the indexes, as this can cause conflicts.
- Run the command `bitcoind --reindex` to start the reindexing process. This will rebuild the block index and recreate the chainstate.

Alternatively, if you suspect corruption of the chainstate only, you can use the command `bitcoind --reindex-chainstate` instead. This will recreate the chainstate without rebuilding the block index.

Note that running `bitcoind --reindex` on a pruned node will delete all blockchain data and start from scratch, so use this option with caution.

---

<div class="post-metadata">

**Author:** ![Samara](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@Samara](https://community.umbrel.com/u/Samara)\
**Post date:** [June 24, 2024, 3:52pm UTC](https://community.umbrel.com/t/command-for-reindex-blockchain/15873/3 "2024-06-24T15:52:18Z")

</div>

I do not seem to be able to run the bitcoind --reindex. I am on a newest home server.

Where is bitcoind?  
All apps stopped from graphical interface.  
This is what I tried:  
umbrel@umbrel:/home$ ls  
umbrel  
umbrel@umbrel:/home$ sudo ~/umbrel/scripts/app compose bitcoin exec bitcoind --reindex  
sudo: /home/umbrel/umbrel/scripts/app: **command not found**  
umbrel@umbrel:/home$ cd umbrel  
umbrel@umbrel:~$ ls -al  
total 13  
drwx------ 3 umbrel umbrel 1024 Jun 13 21:48 .  
drwxr-xr-x 3 root root 1024 Apr 30 05:36 …  
-rw------- 1 umbrel umbrel 1099 Jun 16 02:33 .bash\_history  
-rw-r–r-- 1 umbrel umbrel 220 Apr 30 05:36 .bash\_logout  
-rw-r–r-- 1 umbrel umbrel 3526 Apr 30 05:36 .bashrc  
-rw------- 1 umbrel umbrel 20 Jun 13 21:48 .lesshst  
-rw-r–r-- 1 umbrel umbrel 807 Apr 30 05:36 .profile  
-rw-r–r-- 1 umbrel umbrel 0 May 7 14:29 .sudo\_as\_admin\_successful  
-rw------- 1 umbrel umbrel 946 Jun 10 20:08 .viminfo  
drwxr-xr-x 8 root root 1024 Jun 24 14:01 umbrel  
umbrel@umbrel:~$ cd umbrel  
umbrel@umbrel:~/umbrel$ ls -al  
total 9  
drwxr-xr-x 8 root root 1024 Jun 24 14:01 .  
drwx------ 3 umbrel umbrel 1024 Jun 13 21:48 …  
drwxr-xr-x 10 root root 1024 Jun 23 00:06 app-data  
drwxr-xr-x 4 root root 1024 Jun 24 03:21 app-stores  
drwxr-xr-x 2 root root 1024 Mar 11 2026 bin  
drwxr-xr-x 3 root root 1024 Mar 11 2026 db  
drwxr-xr-x 2 root root 1024 Mar 11 2026 secrets  
drwxr-xr-x 3 umbrel umbrel 1024 Jun 9 18:15 tor  
-rw-r–r-- 1 root root 517 Jun 24 14:01 umbrel.yaml  
umbrel@umbrel:~/umbrel$ sudo docker exec bitcoin bitcoind --reindex  
Error response from daemon: No such container: bitcoin  
umbrel@umbrel:

It seems to me that the /scripts/ fplder does not exist anymore.

---

<div class="post-metadata">

**Author:** ![matrix\_stuff](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@matrix\_stuff](https://community.umbrel.com/u/matrix_stuff)\
**Post date:** [June 24, 2024, 6:15pm UTC](https://community.umbrel.com/t/command-for-reindex-blockchain/15873/4 "2024-06-24T18:15:57Z")

</div>

```auto
sudo nano /data/umbrel-os/home/umbrel/umbrel/app-data/bitcoin/data/bitcoin/umbrel-bitcoin.conf

```

Add the following line to the file

```auto
reindex=1

```

Then restart bitcoin core app (right click → restart)

After it restarts (and starts reindexing) open the file again and make sure that line is no longer present, so the next restart in the future it won’t redo the whole thing.  
The process should take between a few days to a couple of weeks, depending if using SSD.

---

<div class="post-metadata">

**Author:** ![Samara](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@Samara](https://community.umbrel.com/u/Samara)\
**Post date:** [June 24, 2024, 10:48pm UTC](https://community.umbrel.com/t/command-for-reindex-blockchain/15873/5 "2024-06-24T22:48:05Z")

</div>

Thank you. It started the reindexing. Will take a 2 or 3 days. I thought I was smart at pruning the db…… I did not know that electro did not work on pruned data.
