<p><code>importwallet</code> is the opposite RPC of <code>dumpwallet</code>, not <code>backupwallet</code>.</p>

<p><code>backupwallet</code> creates a copy of your wallet.dat file. You restore that file by putting it back in the data directory.</p>

<p><code>dumpwallet</code> creates a wallet dump (just private keys, no history, addresses, labels, accounts, ...), which can be imported into an existing wallet using <code>importwallet</code>.</p>

CC BY-SA 4.0
2019-02-13T20:35:58.953Z
2019-02-13T20:35:58.953Z
Pieter Wuille
<p>Probably this is Bitcoin ABC's bug. As an alternative to <code>backupwallet</code>, <a href="https://bitcoincore.org/en/doc/0.16.0/rpc/wallet/dumpwallet/" rel="nofollow noreferrer"><code>dumpwallet</code></a> might work.</p>

<p>In addition, please file a bug report at <a href="https://github.com/Bitcoin-ABC/bitcoin-abc/issues" rel="nofollow noreferrer">https://github.com/Bitcoin-ABC/bitcoin-abc/issues</a>.</p>

CC BY-SA 4.0
2018-09-09T12:30:38.230Z
2018-09-09T12:30:38.230Z
MCCCS
<p>Check which database version the various abc -qt wallets use as their backend.  Any change will prevent using the old one from writing a wallet.dat suitable for the new one.  To do what you are doing, I'm on step 2 of
- create an account at a reputable exchange
- do a small test transaction to check that your coin gets there
- do another small test transaction to check that you can get coin back to your new wallet
- move your coin from home to the exchange 
- move your coin from the exchange to your new wallet at home
That is four transaction fees just because someone thought that bdb4.8 was too samey to keep the same.</p>

CC BY-SA 4.0
2019-01-14T16:49:54.223Z
2019-01-14T16:49:54.223Z
mephisto
<p>I'd like move my bitcoin cash wallet from one server to the other using the cli. </p>

<p>Server 1: bitcoin abc: 0.17.2.
Server 2: bitcoin abc: 0.18.0</p>

<p>I have done the following:</p>

<ol>
<li>ran the command: backupwwallet "myfile.dat" on server 1 successfully. </li>
<li>copy the "myfile.dat" to server 2.</li>
<li>rand the command: importwallet "myfile.dat".</li>
</ol>

<p>I get the following the error when trying to import the wallet:</p>

<pre><code>error code: -8
error message:
Cannot open wallet dump file.
</code></pre>

<p>I have also tried to replace stop the node on server 2 and copy the wallet.dat over to the other server and then start the wallet up again on server 2. 
I get the following error in the logs:</p>

<pre><code>CDBEnv::Open: LogDir=/home/cryptodaemon/.bitcoincash/database ErrorFile=/home/cryptodaemon/.bitcoincash/db.log
2018-09-09 07:48:21 Failed to rename wallet.dat to wallet.dat.1536479301.bak
</code></pre>

<p>How can I move the wallet from one server to another?
Could anyone give me pointers in doing this?</p>

CC BY-SA 4.0
2020-12-28T13:10:14.547Z
For future readers: the Bitcoin-ABC client is (confusingly) not a Bitcoin client.
Antoine Poinsot
<ecash>
Import/Export wallet vi bitcoin-cli. Bitcoin abc node
Guculuma
# Import/Export wallet vi bitcoin-cli. Bitcoin abc node

(Asked by: username_0 on 2018-09-09)

I'd like move my bitcoin cash wallet from one server to the other using the cli.

Server 1: bitcoin abc: 0.17.2.
Server 2: bitcoin abc: 0.18.0

I have done the following:

1. ran the command: backupwwallet "myfile.dat" on server 1 successfully.
2. copy the "myfile.dat" to server 2.
3. rand the command: importwallet "myfile.dat".

I get the following the error when trying to import the wallet:

```
error code: -8
error message:
Cannot open wallet dump file.

```

I have also tried to replace stop the node on server 2 and copy the wallet.dat over to the other server and then start the wallet up again on server 2.
I get the following error in the logs:

```
CDBEnv::Open: LogDir=/home/cryptodaemon/.bitcoincash/database ErrorFile=/home/cryptodaemon/.bitcoincash/db.log
2018-09-09 07:48:21 Failed to rename wallet.dat to wallet.dat.1536479301.bak

```

How can I move the wallet from one server to another?
Could anyone give me pointers in doing this?

**Tags:** ecash

> **Comments:**
> **username_1**: For future readers: the Bitcoin-ABC client is (confusingly) not a Bitcoin client.  

---

## 3 answers

### Answer by username_2 on 2019-02-13. Score: 2

`importwallet` is the opposite RPC of `dumpwallet`, not `backupwallet`.

`backupwallet` creates a copy of your wallet.dat file. You restore that file by putting it back in the data directory.

`dumpwallet` creates a wallet dump (just private keys, no history, addresses, labels, accounts, ...), which can be imported into an existing wallet using `importwallet`.


---

### Answer by username_3 on 2018-09-09. Score: 0

Probably this is Bitcoin ABC's bug. As an alternative to `backupwallet`, [`dumpwallet`](https://bitcoincore.org/en/doc/0.16.0/rpc/wallet/dumpwallet/) might work.

In addition, please file a bug report at <https://github.com/Bitcoin-ABC/bitcoin-abc/issues>.


---

### Answer by username_4 on 2019-01-14. Score: 0

Check which database version the various abc -qt wallets use as their backend. Any change will prevent using the old one from writing a wallet.dat suitable for the new one. To do what you are doing, I'm on step 2 of
- create an account at a reputable exchange
- do a small test transaction to check that your coin gets there
- do another small test transaction to check that you can get coin back to your new wallet
- move your coin from home to the exchange
- move your coin from the exchange to your new wallet at home
That is four transaction fees just because someone thought that bdb4.8 was too samey to keep the same.


---

