Bitcoin full node and query server

Mar 16, 2024

View in context in the libbitcoin Slack #general mirror.

evoskuil23:13
The snapshot flushes table bodies, just to ensure they are written to disk, and then copies headers from memory into a new index directory. So the snapshot constitutes the full set of headers and the corrupted bodies. But as the bodies are append only, they are perfectly valid given the uncorrupted headers. Furthermore the logical body size is retained by the header, so during restore the bodies are truncated. As a result, as long as a live snapshot has been taken an external full backup can be made by copying the snapshot directory and the body directory. This can be done safely against the '/secondary' directory (as opposed to '/primary' since the former is always created by a file system directory rename from primary - ensuring that its files are a consistent and complete set.
(edited)