Migrate from old IPFS server to new

Hello. I have up running website which is serving music from ipfs. I want to install new ipfs server and migrate all data (music files) from old server to new. How can I do that?
Thank you in advance

If you want to make an identical copy of your old ipfs server, one option would be to

  1. Stop the daemon on the old ipfs server (and don’t interact with the repository)
  2. Copy the entire .ipfs folder to your new server using your tool of choice (e.g., rsync)
1 Like

Hi @ehsanhajian, please don’t open duplicated threads:

1 Like

What if I run a cluster IPFS then sync to servers and after that shutdown the old server?

Yes, that’s equivalent. But for a one time shot, you can just use the other, simpler solutions provided before.

After Migration I have below log in ipfs. can you please help on this matter?

127.0.0.1 - - [12/Mar/2019:09:12:33 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [12/Mar/2019:09:12:34 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [12/Mar/2019:09:12:43 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [12/Mar/2019:09:12:48 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [12/Mar/2019:09:12:56 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [12/Mar/2019:09:12:57 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [12/Mar/2019:09:12:57 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [12/Mar/2019:09:13:02 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [12/Mar/2019:09:13:03 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [12/Mar/2019:09:13:07 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [12/Mar/2019:09:13:07 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [12/Mar/2019:09:13:14 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [12/Mar/2019:09:13:18 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [12/Mar/2019:09:13:19 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [12/Mar/2019:09:13:21 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [12/Mar/2019:09:13:24 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [12/Mar/2019:09:13:25 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [12/Mar/2019:09:13:35 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [12/Mar/2019:09:13:36 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [12/Mar/2019:09:13:36 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”

What log are you referring to? What method did you end up using to migrate the IPFS repo to the new server?

What command are you running?

1- This is the Nginx log. I used reverse proxy for IPFS connection.
2- I stoped IPFS on old server and rsync .ipfs to new server and start it.

How do you have nginx set up and what are you trying to use it for?

My initial guess is that it looks like something is trying to connect to the swarm port (4001 by default) instead of the gateway port for the daemon (8080 by default).

location / {
proxy_pass http://a.b.c.d:8080;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}

This is my Nginx conf

What’s the nginx listening port?

What does the nginx error log file show for these failed requests?

Nginx listened on 10001
Actually this msg generating every one sec almost. This error appeared in nginx log file.

127.0.0.1 - - [13/Mar/2019:17:44:30 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [13/Mar/2019:17:44:37 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [13/Mar/2019:17:44:41 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [13/Mar/2019:17:44:49 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [13/Mar/2019:17:44:51 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [13/Mar/2019:17:44:58 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [13/Mar/2019:17:44:58 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [13/Mar/2019:17:44:58 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [13/Mar/2019:17:44:59 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [13/Mar/2019:17:45:12 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [13/Mar/2019:17:45:13 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”
127.0.0.1 - - [13/Mar/2019:17:45:18 +0000] β€œ\x13/multistream/1.0.0” 400 182 β€œ-” β€œ-”

and below errors are for ipfs log file.

ipfs[23606]: 17:33:25.973 ERROR bitswap: Ended request for cid (QmZWE6hkBaGnDgvbgWSLrPS8qrfUVynRiw1b8ArFo
Mar 12 20:50:29 ipfsmedia ipfs[23606]: 20:50:29.304 ERROR bitswap: Ended request for cid (QmZWE6hkBaGnDgvbgWSLrPS8qrfUVynRiw1b8ArFo
Mar 12 20:57:25 ipfsmedia ipfs[23606]: 20:57:25.949 ERROR bitswap: Ended request for cid (QmZWE6hkBaGnDgvbgWSLrPS8qrfUVynRiw1b8ArFo
Mar 12 22:06:13 ipfsmedia ipfs[23606]: 22:06:13.175 ERROR bitswap: Ended request for cid (QmZWE6hkBaGnDgvbgWSLrPS8qrfUVynRiw1b8ArFo
Mar 12 22:09:32 ipfsmedia ipfs[23606]: 22:09:32.579 ERROR bitswap: Ended request for cid (QmZWE6hkBaGnDgvbgWSLrPS8qrfUVynRiw1b8ArFo
Mar 13 02:31:17 ipfsmedia ipfs[23606]: 02:31:17.075 ERROR bitswap: Ended request for cid (QmZWE6hkBaGnDgvbgWSLrPS8qrfUVynRiw1b8ArFo
Mar 13 03:18:37 ipfsmedia ipfs[23606]: 03:18:37.141 ERROR bitswap: Ended request for cid (QmZWE6hkBaGnDgvbgWSLrPS8qrfUVynRiw1b8ArFo
Mar 13 03:19:36 ipfsmedia ipfs[23606]: 03:19:36.298 ERROR bitswap: Ended request for cid (QmZWE6hkBaGnDgvbgWSLrPS8qrfUVynRiw1b8ArFo
Mar 13 08:52:46 ipfsmedia ipfs[23606]: 08:52:46.105 ERROR bitswap: Ended request for cid (QmNYHh8CNjwrri3pmJGNYW8WNnVcQtuVe4wo7uDrj
Mar 13 16:33:49 ipfsmedia ipfs[23606]: 16:33:49.230 ERROR bitswap: Ended request for cid (QmZWE6hkBaGnDgvbgWSLrPS8qrfUVynRiw1b8ArFo

What are you attempting to do that’s functionally not working? Or is everything working and you’re just trying to troubleshoot why multistream entries are showing up in the logs?

Why is nginx configured to listen on 10001?

Yes everything is working fine I just want to troubleshoot why I have such msg in log.

Regarding Nginx port this is some our app configuration. Not related to IPFS part.

I don’t think the messages from the IPFS daemon are related to the entries in the nginx log.

/multistream/1.0.0 is the response you get if you try to connect to the swarm port (4001 by default) for an IPFS node. Unless another part of your nginx config is responsible for this, I wonder if your node is responding to connection attempts from IPFS nodes that have 10001 configured as their swarm port (or are advertising it).

What does ipfs swarm peers | grep 10001 show? If it shows something, I bet these are responses to lip2p connection attempts from IPFS nodes saying they’re listening on 10001. FWIW I’m currently connected to at least 5 peers with 10001 listed as a listening port.

edit: even if my guess is correct, I was just thinking that ipfs swarm peers might not show peers with 10001 as their advertised port since you probably can’t successfully connect to them (even if they’re trying to connect to you).

This does not work for me. After rsync, the ipfs pin ls on the new server does not include files pinned on old server. Is there anything I should note? Does version matter? does ipfs init matter?
Old server:

go-ipfs version: 0.4.22-
Repo version: 7
System version: amd64/linux
Golang version: go1.12.7

New server:

go-ipfs version: 0.4.23-
Repo version: 7
System version: amd64/linux
Golang version: go1.13.7

Was the IPFS daemon stopped on both the old and new server before the rsync?

How does ipfs repo stat compare between the old and new servers?