Comments (7)
The seed should be backed up when the wallet is created, and is used to recreate a new wallet with the same keys. Since the seed is not saved, it cannot be exported at a later time.
from btcwallet.
I would like to reopen this. The backupwallet
RPC call on bitcoin core writes the wallet in a consistent state so that it can be backed up and be used on a future restart.
This is very useful beyond backing up HD keys:
- Single non-HD keys that can't be restored with a seed (eg, imported ones).
- When restoring an HD wallet from the seed, I might not know which wallet chains and addresses have been created and used previously. Searching through this history is very quickly extremely costly (as each new address has to be rescanned).
- Rescans can take a lot of time.
- Any other metadata in the db is lost.
Many of these things are not super critical for the average home user, but remember that down-times over a few seconds/minutes are not acceptable in a professional production environment.
For these reasons I think that a functionality as provided by backupwallet
is very much needed.
from btcwallet.
For us, this is as easy as copying the wallet.db
file while wallet is closed. Bitcoin Core Wallet needs an RPC for this since it's not as simple as copying the wallet file since it references the blockchain data as well.
No need to go over RPC to export everything in the wallet.
from btcwallet.
So how do I copy this file while running? Do you mean that I have to shut down btcwallet every time I backup (thereby losing all rpc client connections etc)?
from btcwallet.
Copying a file isn't an atomic operation on any filesystem that I know of. While the entire original file should always be in some kind of consistent state, the copy might not be.
from btcwallet.
I'd suggest having the RPC work similar to the existing export watching wallet RPC function. That is to say, have it create a read transaction and use WriteTo
to write the full contents to a separate file. That will provide a safe method for requesting a backup to be made while the wallet process is operational.
This also means you won't be trying to copy all of the data over the RPC connection, which I don't so much benefit to. I would expect having a second file that contains a consistent backup which the user can then use rsync, or whatever their preferred method is, to copy the file to offline storage is preferable.
from btcwallet.
I still believe that recreating the wallet via the seed is the best method of recovering a wallet. I'm not a fan of using an RPC to write local files which the client then has to fetch off of the server's filesystem.
from btcwallet.
Related Issues (20)
- Cannot create wallet because of -32601: Method not found HOT 8
- Create wallet returns error: Unknown database type HOT 1
- Send Raw Transaction Error HOT 1
- -25: TX rejected: failed to validate input 11290e0....:0 which references output cf....a015ea68, prev output script bytes 76a91....8ac) HOT 7
- -25: TX rejected: failed to validate input c26....:0 which references output 37....:0 - OP_EQUALVERIFY failed (input witness [], input script bytes 473..., prev output script bytes 76a914...) HOT 2
- Ask for advice about using multiple utxos for the transaction HOT 2
- Non-witness inputs cannot have a witness HOT 5
- Ask for example for simple P2TR transaction HOT 8
- "error": "address manager is locked" HOT 4
- Bech32 (P2WPKH
- listaccounts only checks balances for KeyScopeBIP0044 addresses
- Allow setting the start block for address rescans HOT 4
- NIT: Bitcoin 0.25 changed the error text so our matching fails now and spams the logs. HOT 1
- Improvements for the chain package and the especially the pruned block fetcher. HOT 1
- GetDustThreshold does not take into account taproot HOT 2
- Add Wallet Use Case
- waddrmgr scope incorrect,Possible non-compliance with BIP HOT 4
- How should I use the wallet after I start btcwallet [-4: blockchain RPC is inactive]
- Test
- config: allow changing the default root directory
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from btcwallet.