<p>That alone doesn't provide enough information to know which database file the error is occurring with.   The debug.log might give a more precise indication.</p>

<p>If it is a problem with the blockchain, that is easily resolved.  If the problem occurred after your computer crashed, that is likely what happened. </p>

<p>First though check to eliminate that the problem is that your hard drive partition is filled with no disk space remaining.  That probably isn't the case on your Mac, but just in case, check first.</p>

<p>So, after making yet another backup up your wallet.dat, then you can do this to get a new copy of the blockchain:</p>

<p>These instructions are for mac.  For Linux and Windows the <a href="https://en.bitcoin.it/wiki/Data_directory#Default_Location" rel="nofollow">directory</a> names would be different.</p>

<pre><code> $ cd ~/Library/Application Support 
 $ mv Bitcoin Bitcoin-bak
 $ mkdir Bitcoin
 $ cd Bitcoin
 $ cp ../Bitcoin-bak/wallet.dat .
</code></pre>

<p>Then launch Bitcoin-Qt as normal.  It will re-download the blockchain.  This could take 24 hours or more, depending on a number of factors.</p>

<p>You might speed that up a bit by getting the blockchain as-of block 170,000 from here:</p>

<ul>
<li><a href="http://sourceforge.net/projects/bitcoin/files/Bitcoin/blockchain" rel="nofollow">http://sourceforge.net/projects/bitcoin/files/Bitcoin/blockchain</a></li>
</ul>

<p>After it downloads, extract those files into your new ~/.bitcoin directory.</p>

<p>If after Bitcoin-qt downloads the blockchain to the most recent block and everything works fine (shows your wallet balance and transactions properly), you can then remove the .bitcoin-bak directory:</p>

<pre><code>$ cd ~/Library/Application Support 
$ rm -rf Bitcoin-bak
</code></pre>

<p>Also, the blockchain download is faster if you are on the most recent release of Bitcoin-Qt, v0.6.3.</p>

CC BY-SA 3.0
2012-09-14T22:45:09.580Z
I am embarrassed to say that I cannot even find the wallet.dat file. like i previously stated I am a complete novice and cannot navigate terminal well at all. I am following what i have read as best i can and keep getting terminal messages that say there is no such file.
nico1234
CC BY-SA 3.0
2012-09-14T22:45:50.140Z
but i would like to say thank you to you guys thus far. really appreciate it
nico1234
CC BY-SA 3.0
2012-09-14T23:18:23.520Z
Oops, I had the wrong directory names, ... Mac is different.  Updated the post.  Try again please.
Stephen Gornick
CC BY-SA 3.0
2012-09-14T23:19:15.250Z
Also, I added a note about the disk space.  Just check that the disk isn't full -- that could cause this as well.
Stephen Gornick
CC BY-SA 3.0
2012-09-15T01:53:56.070Z
got terminal working. buuuuut it still doesnt think there is a wallet.dat file: miltons-MacBook-Pro:Bitcoin milton$ cd ~/Library /Application Support
miltons-MacBook-Pro:Library milton$ mv Bitcoin Bitcoin-bak
miltons-MacBook-Pro:Library milton$ mkdir Bitcoin
miltons-MacBook-Pro:Library milton$ cd Bitcoin
miltons-MacBook-Pro:Bitcoin milton$ cp ~/Bitcoin-bak/wallet.dat .
cp: /Users/milton/Bitcoin-bak/wallet.dat: No such file or directory
miltons-MacBook-Pro:Bitcoin milton$
nico1234
CC BY-SA 3.0
2012-09-15T02:21:54.613Z
thanks again for all th help. still havent fixed it but i think i am on the right path, as everything worked except the last command line
nico1234
CC BY-SA 3.0
2012-09-15T09:09:13.283Z
Sorry, fixed my typo.  Try this:

  $ cd ~/Library/Application Support/Bitcoin

then

  $ cp ../Bitcoin-bak/wallet.dat .
Stephen Gornick
CC BY-SA 3.0
2012-09-15T17:30:51.687Z
should i try these two command lines after, $ cd ~/Library/Application Support 
 $ mv Bitcoin Bitcoin-bak
 $ mkdir Bitcoin
 $ cd Bitcoin
nico1234
CC BY-SA 3.0
2012-09-18T08:09:00.200Z
I'm sorry, stack exchange comments suck as far as communicating.  If you'ld like further assistance, please request help in the #bitcoin IRC channel: http://webchat.freenode.net/?channels=#bitcoin
Stephen Gornick
CC BY-SA 3.0
2012-09-14T22:00:28.443Z
2012-09-15T09:08:53.923Z
2012-09-15T09:08:53.923Z
Stephen Gornick
<p>i am running bitcoin client on OSX. I am by no stretch of the imagination any good at using terminal. I had over 300 btc in there and my computer went black and now client keeps giving me this message "A fatal error occured. Bitcoin can no longer continue safely and will quit.</p>

<p>EXCEPTION: 22DbRunRecoveryException<br>
DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery<br>
bitcoin in Runaway exception<br>
"
I can pay somebody to help me fix this problem. dont want to lose the coins i have there. thanks. you'll have to bear with me though. not too good at this. </p>

CC BY-SA 3.0
2012-09-14T19:46:46.477Z
If you don't already have a backup of your `wallet.dat` file, make one now. If you do already have one, make another but don't overwrite the old one with this one. So long as you have some file that contains your private keys, you will ultimately be able to recover the coins.
David Schwartz
CC BY-SA 3.0
2012-09-14T21:48:43.203Z
And be cautious if you proceed to hire someone to help.
Stephen Gornick
<bitcoin-core><mac>
Why is my client saying "A fatal error occured. Bitcoin can no longer continue safely and will quit. "?
nico1234
# Why is my client saying "A fatal error occured. Bitcoin can no longer continue safely and will quit. "?

(Asked by: username_0 on 2012-09-14)

i am running bitcoin client on OSX. I am by no stretch of the imagination any good at using terminal. I had over 300 btc in there and my computer went black and now client keeps giving me this message "A fatal error occured. Bitcoin can no longer continue safely and will quit.

EXCEPTION: 22DbRunRecoveryException  
DbEnv::open: DB\_RUNRECOVERY: Fatal error, run database recovery  
bitcoin in Runaway exception  
"
I can pay somebody to help me fix this problem. dont want to lose the coins i have there. thanks. you'll have to bear with me though. not too good at this.

**Tags:** bitcoin-core, mac

> **Comments:**
> **username_1**: If you don't already have a backup of your `wallet.dat` file, make one now. If you do already have one, make another but don't overwrite the old one with this one. So long as you have some file that contains your private keys, you will ultimately be able to recover the coins.  
> **username_2**: And be cautious if you proceed to hire someone to help.  

---

## 1 answers

### Answer by username_2 on 2012-09-14. Score: 2

That alone doesn't provide enough information to know which database file the error is occurring with. The debug.log might give a more precise indication.

If it is a problem with the blockchain, that is easily resolved. If the problem occurred after your computer crashed, that is likely what happened.

First though check to eliminate that the problem is that your hard drive partition is filled with no disk space remaining. That probably isn't the case on your Mac, but just in case, check first.

So, after making yet another backup up your wallet.dat, then you can do this to get a new copy of the blockchain:

These instructions are for mac. For Linux and Windows the [directory](https://en.bitcoin.it/wiki/Data_directory#Default_Location) names would be different.

```
 $ cd ~/Library/Application Support 
 $ mv Bitcoin Bitcoin-bak
 $ mkdir Bitcoin
 $ cd Bitcoin
 $ cp ../Bitcoin-bak/wallet.dat .

```

Then launch Bitcoin-Qt as normal. It will re-download the blockchain. This could take 24 hours or more, depending on a number of factors.

You might speed that up a bit by getting the blockchain as-of block 170,000 from here:

* <http://sourceforge.net/projects/bitcoin/files/Bitcoin/blockchain>

After it downloads, extract those files into your new ~/.bitcoin directory.

If after Bitcoin-qt downloads the blockchain to the most recent block and everything works fine (shows your wallet balance and transactions properly), you can then remove the .bitcoin-bak directory:

```
$ cd ~/Library/Application Support 
$ rm -rf Bitcoin-bak

```

Also, the blockchain download is faster if you are on the most recent release of Bitcoin-Qt, v0.6.3.

> **Comments:**
> **username_0**: I am embarrassed to say that I cannot even find the wallet.dat file. like i previously stated I am a complete novice and cannot navigate terminal well at all. I am following what i have read as best i can and keep getting terminal messages that say there is no such file.  
> **username_0**: but i would like to say thank you to you guys thus far. really appreciate it  
> **username_2**: Oops, I had the wrong directory names, ... Mac is different.  Updated the post.  Try again please.  
> **username_2**: Also, I added a note about the disk space.  Just check that the disk isn't full -- that could cause this as well.  
> **username_0**: got terminal working. buuuuut it still doesnt think there is a wallet.dat file: miltons-MacBook-Pro:Bitcoin milton$ cd ~/Library /Application Support miltons-MacBook-Pro:Library milton$ mv Bitcoin Bitcoin-bak miltons-MacBook-Pro:Library milton$ mkdir Bitcoin miltons-MacBook-Pro:Library milton$ cd Bitcoin miltons-MacBook-Pro:Bitcoin milton$ cp ~/Bitcoin-bak/wallet.dat . cp: /Users/milton/Bitcoin-bak/wallet.dat: No such file or directory miltons-MacBook-Pro:Bitcoin milton$  
> **username_0**: thanks again for all th help. still havent fixed it but i think i am on the right path, as everything worked except the last command line  
> **username_2**: Sorry, fixed my typo.  Try this:    $ cd ~/Library/Application Support/Bitcoin  then    $ cp ../Bitcoin-bak/wallet.dat .  
> **username_0**: should i try these two command lines after, $ cd ~/Library/Application Support   $ mv Bitcoin Bitcoin-bak  $ mkdir Bitcoin  $ cd Bitcoin  
> **username_2**: I'm sorry, stack exchange comments suck as far as communicating.  If you'ld like further assistance, please request help in the #bitcoin IRC channel: http://webchat.freenode.net/?channels=#bitcoin  

---

