Migrating ipfs to another node

i use go-ipfs, have a total of 16Gb stored on the ipfs. i’m planning to move to another country. What should i do? Just grab the CID of my main directory and import it into the node? What’s the best practice here?

yes, that one way to do it

(the main directory doesn’t might not store everything, you could pin data that isn’t in there, use (ipfs pin ls --type=recursive; ipfs pin ls --type=direct) to find thoses)

An other way is to shutdown the node, and remote copy the .ipfs folder (tar over ssh, rsync over ssh, …) and restart it on the other machine.

Setup an https://cluster.ipfs.io/ and make them follow each other.

That will make sync their files automatically (files that have been added to the cluster not the nodes, you just need to ipfs-cluster-ctl pin add them basically).

I have a small script where I can point it at a data center in the world, say how much node I want, and it will automagically start X many nodes and join to the cluster, they will then start to sync files with each others.

1 Like

Thank you very much for your advice.

Took a look at the ipfs.cluster stuff and it’s out of my depth. Perhaps later.

1 Like

I’m no expert, but I have been thinking about moving my IPFS node as well. I use IPNS directly and along with my DNS name. I believe that copying the CID (or .ipfs folder) to another node (not referring to clusters) will generate a new IPNS because ipns hash is based on the nodes private key. I haven’t tried it to know for sure, but if keeping the same IPNS is important to your use case it might be something to take into consideration.

BWT – i’d love to know how to move a node and keep IPNS the same when I move to a new node. if anyone has ideas on this, i’d love to hear it.

I believe if you copy your .ipfs directory, your private key will stay the same, so your PeerID will also remain the same (this is the default key used with IPNS).

1 Like