Best Practices for Backing Up Your Bitcoin Node

20 replies 295 views
Posts: 224 · Reputation: 87
#1Jun 8, 2024, 08:41 PM
Hey everyone, I run a few full nodes but now I'm thinking to reduce it to one. I want to back up the whole blockchain to an HDD. This way, if I need to set up a new node, I won’t have to go through the whole initial block download process again. Main ideas: 1. Back up the entire ~/.bitcoin/ folder including everything inside. 2. Keep the HDD encrypted. 3. Regularly update the backup (not sure how often). What do you think?
4 Reply Quote Share
orbit1337Senior Member
Posts: 434 · Reputation: 941
#2Jun 10, 2024, 04:07 PM
Why bother? If you have decent bandwidth and RAM, it’s not a big deal to download the blockchain again. Lots of nodes have backup copies online. Just use that instead.
1 Reply Quote Share
gang2015Member
Posts: 682 · Reputation: 62
#3Jun 10, 2024, 04:18 PM
If you’re going for the ideal route, consider this: 1. Note the Bitcoin Core version used for the backup. 2. Create checksums for the files. It’ll save time if you ever need to reindex. 3. Compress the ~/.bitcoin/ folder to save space. I’ve read you can cut down the size by around 20%.
3 Reply Quote Share
orbit1337Senior Member
Posts: 434 · Reputation: 941
#4Jun 11, 2024, 05:34 AM
Tried it with seven block files and used pigz: 135 MB shrank to 94 MB.
1 Reply Quote Share
Posts: 224 · Reputation: 87
#5Jun 11, 2024, 02:16 PM
Yeah, but it’s not just about bandwidth. Waiting three days for a node to work again? That’s a hassle. How do checksums speed things up? They help with integrity, but that's different.
1 Reply Quote Share
orbit1337Senior Member
Posts: 434 · Reputation: 941
#6Jun 11, 2024, 03:48 PM
Also, if I compress the backup, I could slap an encryption password on that file. Easier than encrypting the whole disk.
2 Reply Quote Share
Posts: 224 · Reputation: 87
#7Jun 11, 2024, 05:15 PM
I'm running short on RAM so I get it. That wait can be painfully long. I just want to avoid it if possible.
4 Reply Quote Share
alpha23Member
Posts: 116 · Reputation: 79
#8Jun 11, 2024, 06:47 PM
For me, it's not just the size but the validation of blocks that’s a pain. Spammers make it harder to validate blocks now.
1 Reply Quote Share
orbit1337Senior Member
Posts: 434 · Reputation: 941
#9Jun 11, 2024, 08:03 PM
That’s not the whole story. What sets a "gaming" PC apart is the GPU, but Bitcoin Core doesn’t use that.
0 Reply Quote Share
Posts: 224 · Reputation: 87
#10Jun 11, 2024, 09:52 PM
Disagree with that. What matters is: 1. RAM allows you to download the blockchain faster. 2. Good bandwidth is a must. 3. Storage type matters too. SSDs beat HDDs.
0 Reply Quote Share
orbit1337Senior Member
Posts: 434 · Reputation: 941
#11Jun 12, 2024, 12:03 AM
Yeah, a system with 32 GB RAM and HDD could actually outperform one with just 8 GB RAM and NVMe.
5 Reply Quote Share
pr0to88Member
Posts: 1222 · Reputation: 235
#12Jun 13, 2024, 03:13 AM
I think you both neglect dbcache adjustments. If it’s not set right, the RAM won’t make a difference.
4 Reply Quote Share
Posts: 224 · Reputation: 87
#13Jun 13, 2024, 05:04 AM
Haven’t tested it personally, but Linux should handle file cache well enough for most tasks. Just assume the settings are correct.
2 Reply Quote Share
orbit1337Senior Member
Posts: 434 · Reputation: 941
#14Jun 13, 2024, 08:43 AM
Computing hashes is faster than reindexing through Bitcoin Core. Just a tip.
2 Reply Quote Share
gang2015Member
Posts: 682 · Reputation: 62
#15Jun 13, 2024, 10:40 AM
Totally agree there! Just a heads-up, OP_RETURN doesn’t go into the UTXO set.
2 Reply Quote Share
Posts: 83 · Reputation: 179
#16Jun 14, 2024, 02:34 AM
I’ve done backups like this before, but I need to sort out my storage issues soon. I’m worried about syncing time with the ever-growing blockchain.
5 Reply Quote Share
Posts: 224 · Reputation: 87
#17Jun 14, 2024, 06:08 AM
If your node is off, can't you just drag and drop the updated blockchain to your other node?
4 Reply Quote Share
orbit1337Senior Member
Posts: 434 · Reputation: 941
#18Jun 14, 2024, 07:15 AM
But with every hardware update, sync times drop a lot. Use rsync for Linux backups. Just remember, different Bitcoin Core versions can have different block files.
1 Reply Quote Share
pr0to88Member
Posts: 1222 · Reputation: 235
#19Jun 14, 2024, 09:21 PM
I’m on a Mac Studio with a beefy SSD and tons of RAM. But yeah, that stuff costs money.
6 Reply Quote Share
Posts: 83 · Reputation: 179
#20Jun 14, 2024, 11:31 PM
Honestly, I just do full copies to an external drive and delete old backups. But I wonder if I can optimize that better.
3 Reply Quote Share

Related topics