# Migrating ipfs to another node

**URL:** <https://discuss.ipfs.tech/t/migrating-ipfs-to-another-node/14484>\
**Category:** Uncategorized\
**Created:** [June 15, 2022, 8:04pm UTC](https://discuss.ipfs.tech/t/migrating-ipfs-to-another-node/14484 "2022-06-15T20:04:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rayswchiu](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/rayswchiu/32/6895_2.png) [@rayswchiu](https://discuss.ipfs.tech/u/rayswchiu)\
**Post date:** [June 15, 2022, 8:04pm UTC](https://discuss.ipfs.tech/t/migrating-ipfs-to-another-node/14484/1 "2022-06-15T20:04:50Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Jorropo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/jorropo/32/3230_2.png) [@Jorropo](https://discuss.ipfs.tech/u/Jorropo)\
**Post date:** [June 15, 2022, 8:26pm UTC](https://discuss.ipfs.tech/t/migrating-ipfs-to-another-node/14484/2 "2022-06-15T20:26:52Z")

</div>

> [@rayswchiu](#):
>
> Just grab the CID of my main directory and import it into the node?

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.

> [@rayswchiu](#):
>
> What’s the best practice here?

Setup an [https://cluster.ipfs.io/](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.

---

<div class="post-metadata">

**Author:** ![rayswchiu](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/rayswchiu/32/6895_2.png) [@rayswchiu](https://discuss.ipfs.tech/u/rayswchiu)\
**Post date:** [June 15, 2022, 10:08pm UTC](https://discuss.ipfs.tech/t/migrating-ipfs-to-another-node/14484/3 "2022-06-15T22:08:16Z")

</div>

Thank you very much for your advice.

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

---

<div class="post-metadata">

**Author:** ![MaTTeo.eth](https://avatars.discourse-cdn.com/v4/letter/m/9e8a1a/32.png) [@MaTTeo.eth](https://discuss.ipfs.tech/u/MaTTeo.eth)\
**Post date:** [June 17, 2022, 1:32pm UTC](https://discuss.ipfs.tech/t/migrating-ipfs-to-another-node/14484/4 "2022-06-17T13:32:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Discordian](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/discordian/32/4692_2.png) [@Discordian](https://discuss.ipfs.tech/u/Discordian)\
**Post date:** [June 21, 2022, 7:01pm UTC](https://discuss.ipfs.tech/t/migrating-ipfs-to-another-node/14484/5 "2022-06-21T19:01:30Z")

</div>

> [@MaTTeo.eth](#):
>
> 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).
