# \-reindex-chainstate to recover

**URL:** <https://community.umbrel.com/t/reindex-chainstate-to-recover/13468>\
**Category:** Support and Troubleshooting\
**Created:** [August 25, 2023, 4:32pm UTC](https://community.umbrel.com/t/reindex-chainstate-to-recover/13468 "2023-08-25T16:32:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![1BTC](https://avatars.discourse-cdn.com/v4/letter/1/9dc877/32.png) [@1BTC](https://community.umbrel.com/u/1BTC)\
**Post date:** [August 25, 2023, 4:32pm UTC](https://community.umbrel.com/t/reindex-chainstate-to-recover/13468/1 "2023-08-25T16:32:53Z")

</div>

I have errors:  
LevelDB read failure: Corruption: not an sstable (bad magic number)  
Fatal LevelDB error: Corruption: not an sstable (bad magic number)  
You can use -debug=leveldb to get more complete diagnostic messages  
Fatal LevelDB error: Corruption: not an sstable (bad magic number)  
Error opening block database.  
Please restart with -reindex or -reindex-chainstate to recover

how to -reindex-chainstate? (not full reindex)

---

<div class="post-metadata">

**Author:** ![smolgrrr](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/smolgrrr/32/2825_2.png) [@smolgrrr](https://community.umbrel.com/u/smolgrrr)\
**Post date:** [August 26, 2023, 1:36am UTC](https://community.umbrel.com/t/reindex-chainstate-to-recover/13468/2 "2023-08-26T01:36:55Z")

</div>

Hi @1BTC,

Please see the following, you can try reindex-chainstate first, and if that doesn’t work do a full reindex.

> [@Official Umbrel Troubleshooting Guide and FAQ](https://community.umbrel.com/t/official-umbrel-troubleshooting-guide-and-faq/9873/1):
>
> Resolving a corrupted blockchain is a time-consuming process. Depending on the size of the blockchain and the speed of your device, this process can take several days. It is important to be patient and not interrupt the process, as interrupting it may result in needing to restart the process from the beginning.
> 
> 1. Connect to your Umbrel device by following the instructions in _How to SSH into umbrelOS on Umbrel Home or Rasberry Pi_ or by accessing a terminal on your Linux machine.
> 2. Run the following command to open bitcoin.conf in a nano text editor. If you are on a Linux machine, you may need to replace `~/umbrel` with the path to your installation directory, as described in _Troubleshooting on Linux_:`sudo nano ~/umbrel/app-data/bitcoin/data/bitcoin/umbrel-bitcoin.conf`
> 3. Add the following line to the file:`reindex=1` or `reindex-chainstate=1`
> 4. Save and exit the file by pressing `CTRL+X`, then `Y`, and then `ENTER`.
> 5. Restart your Bitcoin node by running the following command:`sudo ~/umbrel/scripts/app restart bitcoin`
> 
> Your Bitcoin node will now start the process of reindexing. You can monitor the reindexing progress of your node by accessing your Bitcoin Node app through the browser.
> 
> After your node is fully synced, follow the same steps to remove `reindex=1`/`reindex-chainstate=1` from the `bitcoin.conf` file and restart your Bitcoin Node. If you do not do this, then the lengthy process of reindexing will occur again the next time your node restarts.
> 
> Note: It may also take some time for dependant apps like Electrs to resume functioning after the reindex is the complete.

---

<div class="post-metadata">

**Author:** ![1BTC](https://avatars.discourse-cdn.com/v4/letter/1/9dc877/32.png) [@1BTC](https://community.umbrel.com/u/1BTC)\
**Post date:** [August 26, 2023, 2:22am UTC](https://community.umbrel.com/t/reindex-chainstate-to-recover/13468/3 "2023-08-26T02:22:46Z")

</div>

thank you @smolgrrr i will try and mark as SOLUTION after.

---

<div class="post-metadata">

**Author:** ![1BTC](https://avatars.discourse-cdn.com/v4/letter/1/9dc877/32.png) [@1BTC](https://community.umbrel.com/u/1BTC)\
**Post date:** [August 26, 2023, 3:55am UTC](https://community.umbrel.com/t/reindex-chainstate-to-recover/13468/4 "2023-08-26T03:55:19Z")

</div>

@smolgrrr after rescan can i lose the onchain SAT’ I sent moth ago and that transaction stuck in mempool ?

---

<div class="post-metadata">

**Author:** ![smolgrrr](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/smolgrrr/32/2825_2.png) [@smolgrrr](https://community.umbrel.com/u/smolgrrr)\
**Post date:** [August 26, 2023, 4:07am UTC](https://community.umbrel.com/t/reindex-chainstate-to-recover/13468/5 "2023-08-26T04:07:50Z")

</div>

Sorry I don’t quite understand- you sent bitcoin to your Umbrel wallet but you are still waiting for it in the mempool (to be confirmed)?

The bitcoin node does not hold the funds so it is fine to reindex.  
Either way, you must remember to write down your seed phrase from the lightning node app.

---

<div class="post-metadata">

**Author:** ![1BTC](https://avatars.discourse-cdn.com/v4/letter/1/9dc877/32.png) [@1BTC](https://community.umbrel.com/u/1BTC)\
**Post date:** [August 26, 2023, 4:17am UTC](https://community.umbrel.com/t/reindex-chainstate-to-recover/13468/6 "2023-08-26T04:17:53Z")

</div>

@smolgrrr , I withdrew my sats from umbrel to external QT wallet more than month ago:

> [@Withdraw transaction stuck for 2 months. Please help!](https://community.umbrel.com/t/withdraw-transaction-stuck-for-2-months-please-help/13412/11):
>
> You’ll need to use the tx\_id that was linked when you were looking at mempool.space

after many unsuccessful attempts “bumpfee” I decided to wait while the transaction goes.  
But yesterday the blockchain DB was damaged ☹

---

<div class="post-metadata">

**Author:** ![smolgrrr](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/smolgrrr/32/2825_2.png) [@smolgrrr](https://community.umbrel.com/u/smolgrrr)\
**Post date:** [August 27, 2023, 2:03am UTC](https://community.umbrel.com/t/reindex-chainstate-to-recover/13468/7 "2023-08-27T02:03:25Z")

</div>

Yeah reindexing won’t cause any issues here 🙂

---

<div class="post-metadata">

**Author:** ![1BTC](https://avatars.discourse-cdn.com/v4/letter/1/9dc877/32.png) [@1BTC](https://community.umbrel.com/u/1BTC)\
**Post date:** [August 27, 2023, 3:04am UTC](https://community.umbrel.com/t/reindex-chainstate-to-recover/13468/8 "2023-08-27T03:04:31Z")

</div>

Thnx

---

<div class="post-metadata">

**Author:** ![TCalache](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@TCalache](https://community.umbrel.com/u/TCalache)\
**Post date:** [August 19, 2024, 4:20pm UTC](https://community.umbrel.com/t/reindex-chainstate-to-recover/13468/9 "2024-08-19T16:20:01Z")

</div>

how can i know that reindex is running? I can sse it runnig until 183 530 than it stopped

 ![Core01](https://canada1.discourse-cdn.com/flex030/uploads/getumbrel/original/2X/d/d18a588cdb8d418b899a38cfe0081d402efc5f82.png)  
 ![Core02](https://canada1.discourse-cdn.com/flex030/uploads/getumbrel/original/2X/d/d2398a38f4e26a3c1a12f3633e0d69a9049323c3.png)

---

<div class="post-metadata">

**Author:** ![TCalache](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@TCalache](https://community.umbrel.com/u/TCalache)\
**Post date:** [August 26, 2024, 11:32am UTC](https://community.umbrel.com/t/reindex-chainstate-to-recover/13468/10 "2024-08-26T11:32:15Z")

</div>

after tryied reindex several times, it works
