bitcoin core – Is it prudent to backup chainstate/ and blocks/ if and only if bitcoind is not running?


This is how one might back up their Bitcoin Core data directories in order to save time on syncing in the future:

#!/usr/bin/bash

local_d=/root/btc_db

rsync -av --delete chainstate "$local_d"
rsync -av --delete blocks "$local_d"

Sometimes backups to a remote location take quite a long time, and so there may a lag of many
block in between rsync -av --delete chainstate "$local_d" and rsync -av --delete blocks "$local_d". Will Bitcoin Core sync seamlessly, e.g. without having to wait for bitcoind -reindex to finish, when being fed chainststate/ backup that corresponds to a different block height
than blocks/?

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top