How can I periodically backup the blockchain file, without copying the entire file (just the new data that was added since the last backup)?

I tried copying only the amount of bytes by which the blockchain is larger than the backup ("filling the gap"), but that didn't seem to work - the daemon failed to load the blockchain from this backup.


rsync copies what's changed:

rsync ~/.bitmonero/lmdb/data.mdb /mnt/wherever/monero-blockchain/data.mdb

This should be done when nothing is writing to the blockchain database file. If you need to copy while it is being written to, use mdb_copy:

mdb_copy ~/.bitmonero/lmdb /mnt/wherever/monero-blockchain/

Note how mdb_copy wants the directory, and not the file.

| improve this answer | |
  • The simplest solution I could ask for! – Jona Oct 2 '17 at 9:25
  • Using rsync or mdb_copy like this will copy the whole database file. Not just what's changed. – jtgrassie Mar 7 '19 at 19:23

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.