Bitcoin Forum
May 14, 2024, 04:38:16 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is it necessary to close bitcoin client before making a backup of wallet file?  (Read 866 times)
bitrebel (OP)
Sr. Member
****
Offline Offline

Activity: 364
Merit: 251


View Profile
August 13, 2011, 02:43:30 AM
 #1

I think I read somewhere that you have to close the bitcoin client before making a wallet file backup. Is this correct?  Huh


Why does Bitrebel have 65+ Ignores?
Because Bitrebel says things that some people do not want YOU to hear.
Maged
Legendary
*
Offline Offline

Activity: 1204
Merit: 1015


View Profile
August 13, 2011, 02:49:31 AM
 #2

It's a good idea. If closing Bitcoin is inconvenient, you should use the backupwallet RPC command. If you don't close Bitcoin and just copy the file, it's not guaranteed that the backup won't be corrupted.

jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1255


May Bitcoin be touched by his Noodly Appendage


View Profile
August 13, 2011, 02:50:37 AM
 #3

I don't think it's critical but as the client locks the wallet database, it's better to close it
Better safe than sorry

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
randomguy7
Hero Member
*****
Offline Offline

Activity: 527
Merit: 500


View Profile
August 13, 2011, 02:52:13 AM
 #4

Good question. I wouldn't trust a wallet backup made while the client was running. I think the file could be in an inconsistent state if it was copied while the client was writing to it.
The next question is if the client can automatically fix such a wallet.dat and if only the new changes are lost or if it breaks the whole wallet.
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1025



View Profile
August 19, 2011, 12:15:22 AM
 #5

If you use the backupwallet command, the client closes the wallet, flushes the write caches, makes a copy, and reopens it, so that you don't need to stop the client.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!