Author

Topic: "backupwallet(importwallet)" command VS "copy" command (Read 295 times)

newbie
Activity: 15
Merit: 4
Very sure backup wallet is very important if not y will lose everything that inside the wallet, that will also make people to run away from crytocurrency because once you have lost your coins which is money you can never like to put any one again.
Than you for good advice.
This server is set in air gapped environment,.
So nobody can access this server through internet.
brand new
Activity: 0
Merit: 0
The 5-year BA LLB Integrated programme is structured comprehensively with subjects of BA as well as LLB.
https://www.sharda.ac.in/course/ba-llb-integrated-63
newbie
Activity: 15
Merit: 4
You cannot back up the wallet by copying without shutting down the software first.  The backupwallet rpc lets you back up while running.

I understood as follows.
In case with copy command,
If the file(wallet.dat)  is being written, it will cause problems.
Is this okay?
staff
Activity: 4242
Merit: 8672
You cannot back up the wallet by copying without shutting down the software first.  The backupwallet rpc lets you back up while running.
newbie
Activity: 15
Merit: 4
Why not use unix "copy" command and then overwrite "wallet.dat" ?

Because not everyone uses Linux/Unix terminal and the guide mention how to backup wallet from bitcoin-cli

Is there anything wrong with this approach ?

AFAIK no, perhaps only permission to copy file with copy/cp command
Thank you for the quick response !

I am happy to hear your experience.

I have one more question about  backup "wallet.dat".

I am running a full node bitcoin server.
And I hope to backup "wallet.dat" every day by using cron which kicks shell scripts.
In this shell script, using "backupwallet" command is better than "copy" command ?
There are hundreds of both singlesig addresses and multisig address in this "wallet.dat".
Is it true that  using wallet.dat command takes much time than using copy command ?

Which do you recommend for backup ?
hero member
Activity: 1120
Merit: 540
Duelbits - Play for Free | Win for Real
Q: What is a difference between bitcoin-core "backupwallet(importwallet)" command and unix "copy" command ?
None.

you don't need to use the command line to back up the wallet. Just run the Bitcoin Core software and go to "File" will appear several options, among them, click the "backup wallet" option, then a window will appear for you to select the directory you would like to save your backup file, name the file to: bitcoin wallet backup or something like that and that's it.

You can do this same backup from the command line using the commands: "backupwallet" or "dumpwallet."

The "dumpwallet" option will dump all private keys in your wallet into a file that you specify during the execution of the command. Ex: dumpwallet "Desktop/bitcoin-keys-backup.key you should encrypt this file later because it is fully readable. That is why command line options are only recommended for users who have a certain experience with Bitcoin, do not use the Bitcoin Core command line unless you know what you are doing...
newbie
Activity: 15
Merit: 4
Q: What is a difference between bitcoin-core "backupwallet(importwallet)" command and unix "copy" command ?

I'm planning to move "wallet.dat" to new server bought a few days ago.

I looked over books how to move "wallet.dat" and understood as below.

--「Mastering Bicoin」 Andreas M. Antonopoulos----
Commands: backupwallet, importwallet, dumpwallet
Next, we will practice creating a wallet backup file and then restoring the wallet from
the backup file. Use the backupwallet command to back up, providing the filename as
the parameter. Here we back up the wallet to the file wallet.backup:

  $ bitcoin-cli backupwallet wallet.backup
  $
Now, to restore the backup file, use the importwallet command. If your wallet is locked,
you will need to unlock it first (see walletpassphrase in the preceding section) in order
to import the backup file:

  $ bitcoin-cli importwallet wallet.backup
  $
---------------------------------------------------------------

I have a question.

Why not use unix "copy" command and then overwrite "wallet.dat" ?

Is there anything wrong with this approach ?
Jump to: