Bitcoin Forum
May 02, 2024, 06:13:13 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: On-the-fly backup possible?  (Read 679 times)
Mike Man (OP)
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile
February 05, 2017, 03:46:35 AM
 #1

Usually when I make a backup of my blockchain data I close Bitcoin Core before doing it. This is a little bothersome as the blockchain is quite large and it takes a while to do it. I would rather continue downloading the last 10 weeks I have left to go.
So, is it OK to back up while Bitcoin Core is running?

Thanks in advance.

Mike
1714673593
Hero Member
*
Offline Offline

Posts: 1714673593

View Profile Personal Message (Offline)

Ignore
1714673593
Reply with quote  #2

1714673593
Report to moderator
1714673593
Hero Member
*
Offline Offline

Posts: 1714673593

View Profile Personal Message (Offline)

Ignore
1714673593
Reply with quote  #2

1714673593
Report to moderator
"In a nutshell, the network works like a distributed timestamp server, stamping the first transaction to spend a coin. It takes advantage of the nature of information being easy to spread but hard to stifle." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6577


Just writing some code


View Profile WWW
February 05, 2017, 04:44:26 AM
 #2

Yes, you can backup while Bitcoin Core is open. You can go to File > Backup Wallet and use that to backup the wallet instead of copy and pasting the file while it is running. That should make sure the backup won't become corrupted.

Mike Man (OP)
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile
February 05, 2017, 04:56:13 AM
 #3

OK, great. Thanks for your advice. I'll use the inbuilt feature. I guess it will save the entire blockchain and not just my empty wallet.

Cheers,

Mike
Foxpup
Legendary
*
Offline Offline

Activity: 4354
Merit: 3042


Vile Vixen and Miss Bitcointalk 2021-2023


View Profile
February 05, 2017, 06:08:26 AM
 #4

No, the Backup Wallet option only copies your wallet.dat file, not the blockchain state, which cannot be safely copied while Bitcoin Core is running. I think achow101 misunderstood the question.

The question is why are you backing up the blockchain state? If you merely want to avoid the bandwidth cost of downloading the blockchain all over again, a workaround is to back up the blocks folder and use the -loadblock parameter to synchronize from that, which should work despite the most recent .blk file likely being corrupt if you copied it while Core was running. It will still take a long time to verify everything. The only way around that is to back up everything while Core isn't running, so that the chainstate data will not be corrupted.

Will pretend to do unspeakable things (while actually eating a taco) for bitcoins: 1K6d1EviQKX3SVKjPYmJGyWBb1avbmCFM4
I am not on the scammers' paradise known as Telegram! Do not believe anyone claiming to be me off-forum without a signed message from the above address! Accept no excuses and make no exceptions!
Mike Man (OP)
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile
February 05, 2017, 10:04:36 AM
 #5

Excellent! Thank you. I went and made a huge batch of beans while I was awaiting follow-up posts.
So then, the safest way for a person with my reasonable, but not great, skills is to shut the show down and then copy the entire folder.

If I'm wrong, please let me know.

Thanks again,

Mike

Ps. The beans are the best batch I have ever made!
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6577


Just writing some code


View Profile WWW
February 05, 2017, 04:19:41 PM
 #6

No, the Backup Wallet option only copies your wallet.dat file, not the blockchain state, which cannot be safely copied while Bitcoin Core is running. I think achow101 misunderstood the question.
Right, now that I re-read it, I see he wants to backup the entire datadir essentially, not the wallet.

So in that case, nothing can be done except to shut it down and backup. However he should not really be doing this as this as the blockchain data does not get deleted unless you prune or manually delete it, and the databases usually don't get corrupted, and if they do, it usually means that something else is broken (e.g. hard drive failure).

unholycactus
Legendary
*
Offline Offline

Activity: 1078
Merit: 1023



View Profile WWW
February 05, 2017, 05:08:23 PM
 #7

You could also make a backup up to a recent block, not necessarily everything.
This would result into downloading the blocks, you haven't backed up and those that were added since the backup.
It shouldn't be too long.
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!