<p>Meanwhile I've answered this question at <a href="https://www.reddit.com/r/Namecoin/comments/3cf16h/please_help_answering_this_open_question_on/" rel="nofollow noreferrer">reddit</a>.</p>
<blockquote>
<p>You have already taken the first 2 out of 3 steps necessary for your wallet migration: (1) cleaned up the data directory that contained old incompatible files, (2) dumped and imported the private keys from the old wallet (alternatively, depending on how old the wallet is, one could try starting the new namecore client with the -upgradewallet parameter).</p>
<p>The internal bookkeeping hasn't had a chance to detect the old transactions that belong to the newly imported private keys, yet. This is the missing third step: <strong>(3) Restart namecore (i.e. namecoind) with the -rescan parameter.</strong></p>
</blockquote>
<p>In short: Now you need to restart the new client with the -rescan parameter.</p>
<p>EDIT: Generally I recommend using namecore's new -upgradewallet parameter:<br />
<code>namecoind -upgradewallet -rescan -reindex</code><br />
as the dumpprivkey/importprivkey approach always bears the risk of confusing the relevant name_update transactions and addresses with older ones. If you do not know how to use the (deprecated) name_debug1 command in Namecoin-Qt then you most likely get it wrong.</p>

CC BY-SA 3.0
2015-07-08T00:49:49.987Z
Thanks. I have already tried that: name_list stays empty.
Rnhmjoj
CC BY-SA 3.0
2015-07-08T04:01:08.960Z
This is what happens when I use -rescan: hastebin.com/axixerizef
Rnhmjoj
CC BY-SA 3.0
2015-07-08T14:04:39.897Z
How many private keys did you import? hastebin shows in line 3 a transfer of NMCs to N3zSdWjXJwtnZHYdRXymSzVzgooDMpAvEw, and at line 4 the operation "name_new id/rnhmjoj" related to NH4FJp1fEMFfE2Jh1dpnAMga7YaQwyL954. The private keys for the name_firstupdate and the name_update operations are missing so far. Most important would be the latest name_update which arrived at MxeWiWXr9U9jwG2KHWyBNKg9uHbiiqZjW6. Are you sure you imported the private key for this address?
cassini
CC BY-SA 3.0
2015-07-08T15:20:55.400Z
Quite sure. I have imported every address I had.
Rnhmjoj
CC BY-SA 3.0
2015-07-08T18:29:17.297Z
Just had a quick conversation with domob, the namecore developer. He recommends also adding the -reindex parameter: namecoind -rescan -reindex
(takes about 1 hour on an i5 with SSD. Much longer when run on a harddisk, I guess. -printtoconsole and -dbcache=400 may help)
cassini
CC BY-SA 3.0
2015-07-08T22:29:43.253Z
This sounds like a bug, @cassini would you mind opening a ticket on Github?
Indolering
CC BY-SA 3.0
2015-07-09T00:03:23.300Z
@cassini That took a while to run however everything seems to be unchanged: name_list is still empty.
Rnhmjoj
CC BY-SA 3.0
2015-07-09T20:23:07.680Z
@Rnhmjoj There are several things that could have gone wrong during your dump/importprivkey attempts, also the old wallet.dat may be partially damaged, or your namecore build had issues during compiling. And as indolering already indicated there could still be a bug in namecore. I think it would be easiest if you send the old wallet file to one of the Namecoin devs. First ask [phelix](http://blockchained.com/namecoin) or [me](http://cassini.tv/) for encryption instructions. You could also try domob, biolizard or indolering. Not sure if they have time at the moment.
cassini
CC BY-SA 3.0
2015-07-09T23:29:43.173Z
The wallet is working fine on another machine that is running namecoin 0.3.80. I did the whole thing several times: compiling namecore, dumping and importing the keys. I also updated the wallet to the latest format from 0.3.80. I don't think is damaged.
Rnhmjoj
CC BY-SA 3.0
2015-07-07T21:54:46.037Z
2015-07-15T09:52:36.447Z
2020-06-16T11:10:03.350Z
cassini
<p>Today I updated namecoin by building the new "namecore" reimplementation  but when starting <code>namecoind</code> I got this message:</p>

<pre><code>Error opening block database.

Do you want to rebuild the block database now?
</code></pre>

<p>and before I could do anything <code>namecoind</code> crashed.
So I moved away the <code>Namecoin</code> folder and let it regenerate everything, blockchain included.
This time it started without errors, so I copied my <code>wallet.dat</code> into the folder and restarted <code>namecoind</code> but I got an <code>Error:</code> and it crashed again.
The <code>debug.log</code> shows this:</p>

<pre><code>2015-06-29 15:36:51 Using wallet wallet.dat
2015-06-29 15:36:51 init message: Verifying wallet...
2015-06-29 15:36:51 CDBEnv::Open: LogDir=/home/michele/Library/Application Support/Namecoin/database ErrorFile=/
2015-06-29 15:36:51 Renamed wallet.dat to wallet.1435592211.bak
2015-06-29 15:36:51 CDBEnv::Salvage: Database salvage found errors,     all data may not be recoverable.
2015-06-29 15:36:51 Salvage(aggressive) found no records in wallet.1435592211.bak.
2015-06-29 15:36:51 Error:
</code></pre>

<p>I figured the wallet format has changed somehow, so using the old client I dumped the private keys and I succefully imported them using <code>importprivkey</code>. I can see the address, the balances and all but <code>name_list</code> shows nothing.</p>

<p>How do I get back my names now?</p>

<bitcoind><namecoin><private-key-import>
How to migrate wallet from namecoin to namecore?
Rnhmjoj
# How to migrate wallet from namecoin to namecore?

(Asked by: username_0 on 2015-06-29)

Today I updated namecoin by building the new "namecore" reimplementation but when starting `namecoind` I got this message:

```
Error opening block database.

Do you want to rebuild the block database now?

```

and before I could do anything `namecoind` crashed.
So I moved away the `Namecoin` folder and let it regenerate everything, blockchain included.
This time it started without errors, so I copied my `wallet.dat` into the folder and restarted `namecoind` but I got an `Error:` and it crashed again.
The `debug.log` shows this:

```
2015-06-29 15:36:51 Using wallet wallet.dat
2015-06-29 15:36:51 init message: Verifying wallet...
2015-06-29 15:36:51 CDBEnv::Open: LogDir=/home/michele/Library/Application Support/Namecoin/database ErrorFile=/
2015-06-29 15:36:51 Renamed wallet.dat to wallet.1435592211.bak
2015-06-29 15:36:51 CDBEnv::Salvage: Database salvage found errors,     all data may not be recoverable.
2015-06-29 15:36:51 Salvage(aggressive) found no records in wallet.1435592211.bak.
2015-06-29 15:36:51 Error:

```

I figured the wallet format has changed somehow, so using the old client I dumped the private keys and I succefully imported them using `importprivkey`. I can see the address, the balances and all but `name_list` shows nothing.

How do I get back my names now?

**Tags:** bitcoind, namecoin, private-key-import


---

## 1 answers

### Answer by username_1 on 2015-07-07. Score: 2

Meanwhile I've answered this question at [reddit](https://www.reddit.com/r/Namecoin/comments/3cf16h/please_help_answering_this_open_question_on/).

> You have already taken the first 2 out of 3 steps necessary for your wallet migration: (1) cleaned up the data directory that contained old incompatible files, (2) dumped and imported the private keys from the old wallet (alternatively, depending on how old the wallet is, one could try starting the new namecore client with the -upgradewallet parameter).
>
> The internal bookkeeping hasn't had a chance to detect the old transactions that belong to the newly imported private keys, yet. This is the missing third step: **(3) Restart namecore (i.e. namecoind) with the -rescan parameter.**

In short: Now you need to restart the new client with the -rescan parameter.

EDIT: Generally I recommend using namecore's new -upgradewallet parameter:  
`namecoind -upgradewallet -rescan -reindex`  
as the dumpprivkey/importprivkey approach always bears the risk of confusing the relevant name\_update transactions and addresses with older ones. If you do not know how to use the (deprecated) name\_debug1 command in Namecoin-Qt then you most likely get it wrong.

> **Comments:**
> **username_0**: Thanks. I have already tried that: name_list stays empty.  
> **username_0**: This is what happens when I use -rescan: hastebin.com/axixerizef  
> **username_1**: How many private keys did you import? hastebin shows in line 3 a transfer of NMCs to N3zSdWjXJwtnZHYdRXymSzVzgooDMpAvEw, and at line 4 the operation "name_new id/username_0" related to NH4FJp1fEMFfE2Jh1dpnAMga7YaQwyL954. The private keys for the name_firstupdate and the name_update operations are missing so far. Most important would be the latest name_update which arrived at MxeWiWXr9U9jwG2KHWyBNKg9uHbiiqZjW6. Are you sure you imported the private key for this address?  
> **username_0**: Quite sure. I have imported every address I had.  
> **username_1**: Just had a quick conversation with domob, the namecore developer. He recommends also adding the -reindex parameter: namecoind -rescan -reindex (takes about 1 hour on an i5 with SSD. Much longer when run on a harddisk, I guess. -printtoconsole and -dbcache=400 may help)  
> **username_2**: This sounds like a bug, @username_1 would you mind opening a ticket on Github?  
> **username_0**: @username_1 That took a while to run however everything seems to be unchanged: name_list is still empty.  
> **username_1**: @username_0 There are several things that could have gone wrong during your dump/importprivkey attempts, also the old wallet.dat may be partially damaged, or your namecore build had issues during compiling. And as username_2 already indicated there could still be a bug in namecore. I think it would be easiest if you send the old wallet file to one of the Namecoin devs. First ask [phelix](http://blockchained.com/namecoin) or [me](http://username_1.tv/) for encryption instructions. You could also try domob, biolizard or username_2. Not sure if they have time at the moment.  
> **username_0**: The wallet is working fine on another machine that is running namecoin 0.3.80. I did the whole thing several times: compiling namecore, dumping and importing the keys. I also updated the wallet to the latest format from 0.3.80. I don't think is damaged.  

---

