I don't know if there's any interest in merging this or not, but I find it useful. It will dump a bootstrap.dat file from a synced node that can be used to sync another node.
You can dump any part of the blockchain using the optional parameters. By default it will dump the whole blockchain.
$ bitcoin-cli help dumpbootstrap
dumpbootstrap <destination> [endblock] [startblock=0]
Creates a bootstrap format block dump of the blockchain in destination, which can be a directory or a path with filename, up to the given endblock number.
Arguments:
1. destination (string, required) Pathname of file to write to. If a directory is use, 'bootstrap.dat' is created in that directory.
2. endblock (numeric, optional, defaults to the last block in the active chain) Height of last block to dump.
3. startblock (numeric, optional, default=0) Height of first block to dump.
Result:
Examples:
> bitcoin-cli dumpbootstrap "/tmp"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "dumpbootstrap", "params": ["/tmp"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
$ bitcoin-cli dumpbootstrap /tmp/ 10
dumped 11 blocks from 0 to 10 into /tmp/bootstrap.dat
$ bitcoin-cli dumpbootstrap /tmp 10 11
error code: -1
error message:
Start block number out of range.
$ bitcoin-cli dumpbootstrap /tmp/ 30 20
dumped 11 blocks from 20 to 30 into /tmp/bootstrap.dat