hi guys,
i want to sync a folder between nodes.
How can I do this?
Thanks!
Not sure if this works. It’s something I’d love to see implemented, but afaik IPFS doesn’t have Dropbox-like cloud functionality with actual sync. So the fundament is an immutable file system, i.e. you can only mirror a certain state of a directory at any given time, from one node to another. To sync a new version of the directory, you would first have to delete the old directory & its contents from the receiving IPFS node, then pin the new directory from the sending node on the receiving node. Imho this doesn’t really change with IPNS, because the only difference is that you now have a shared secret IPNS publishing key and an IPNS hash known to both nodes, but you’ll still not be able to actually sync the shared directory’s contents; you still need to go through the motions, i.e. delete the old files from one node, get the new/edited files from the other node using the IPNS hash.
What you could do is create two nodes, one on each machine, put them into a private swarm (“swarm” of two), two nodes dedicated to sharing just this one directory, then use ipfs-cluster, meaning that all changes to one node will be mirrored on the other node automatically. I don’t know if this works both ways, but maybe this could be a workaround for node sync.
But an actual cloud-like functionality is surely preferred.
If anyone knows a better method, I’m all ears.
Hey, just dropping in to say we have two issues in cluster which are, i think related: https://github.com/ipfs/ipfs-cluster/issues/3 and https://github.com/ipfs/ipfs-cluster/issues/166. And if you guys want to chime in and leave your impressions there that’d be great.