Command for Reindex Blockchain

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

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.

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.

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

Add the following line to the file

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.

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.

1 Like