1

My node recently had a data corruption and I had to re-sync it which was painful.

Presuming I don't use the node as a wallet, what's the easiest way to have a backup with the fully sync'd blockchain? Is it as simple as copying over the files from one external hard-drive over to the other?

2

You can just create a backup of the datadir folder, which could be saved on another hard drive in case your node’s chain state becomes corrupted. In case of corruption, just copy the saved data into the appropriate folder, and your node will then sync from that point in history, rather than starting from scratch. The datadir can be specified in your bitcoin.conf file, but will otherwise be found in the default path.

NOTE: you’ll want to stop the node before starting to copy the files. The normal operation of a node includes a lot of ~random reads and writes to the data directory files, so you’ll want to stop the node first to eliminate the chance of corrupting the data during the copy.

| improve this answer | |
0

You can simply copy and paste the chainstate and blocks folder to some other hard drive. But copy-pasting it back in the case of a failure will still take awhile, though not as long as a full IBD

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.