Author

Topic: On-the-fly backup possible? (Read 707 times)

legendary
Activity: 1078
Merit: 1024
February 05, 2017, 12: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.
staff
Activity: 3458
Merit: 6793
Just writing some code
February 05, 2017, 11:19:41 AM
#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).
newbie
Activity: 22
Merit: 0
February 05, 2017, 05: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!
legendary
Activity: 4536
Merit: 3188
Vile Vixen and Miss Bitcointalk 2021-2023
February 05, 2017, 01: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.
newbie
Activity: 22
Merit: 0
February 04, 2017, 11:56:13 PM
#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
staff
Activity: 3458
Merit: 6793
Just writing some code
February 04, 2017, 11:44:26 PM
#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.
newbie
Activity: 22
Merit: 0
February 04, 2017, 10:46:35 PM
#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
Jump to: