Replicating an ipfs node

Replicating all the content from one ipfs node to another is pretty straighforward. First, ensure both daemons are running, and if you like, connected to eachother before starting (You can skip manually connecting them, if the network is happy they should find eachother just fine). To just replicate pinned content, get all the pins from the source node, and pin them on the second:

[whyrusleeping@source ~]$ ipfs pin ls -q --type=recursive > recursive_pins
# now, on the destination node
[whyrusleeping@dest ~]$ for p in `cat recursive_pins`; do ipfs pin add $p; done
# should print out each pin as its added

If you also want to mirror over unpinned content that just happens to be on your node, gather the output of 'ipfs refs local' and get each block on the destination node:

[whyrusleeping@source ~]$ ipfs refs local > all_the_refs
# now, on the destination node
[whyrusleeping@dest ~]$ for ref in `cat all_the_refs`; do ipfs block get $ref > /dev/null; done

Note that both of these may take a while.