I copied over the IPFS data directory to the new host VM using scp. The old host was on 0.4.13 go-ipfs. I upgraded using the https://github.com/ipfs/fs-repo-migrations tool and am now running 0.6.0 go-ipfs with a docker container. Almost everything works as expected, I can quickly query all the old data via the gateway.
When I query the pins, however, I get an empty object for the keys property where as on my old machine I get about 14MB of pinned objects.
Can you actually verify that the data is still there locally with ipfs repo stat.
The pinset is just a CID that gets recorded. If ipfs pin ls returns nothing, it means that reference is lost. Are you 100% sure you copied everything in the .ipfs folder?
Did you keep a copy from the old repo? If you can get the list of pins with the old ipfs, you could just pin those in the new setup.
I used scp to download the whole folder it to my new host and it didn’t fail on anything.
I didn’t get the ipfs-staging directory but I was under the impression that was not necessary.
I do have both the old and new running since I’ll need to pin anything that’s missing from the new new just before switching over.
Yes I have a script that will iterate over all the CIDs pinned in the old but if the pins should be there then I’m somewhat worried that something might be wrong.
IPFS repo stat shows:
/ # ipfs repo stat
NumObjects: 2088863
RepoSize: 298603440281
StorageMax: 10000000000
RepoPath: /data/ipfs
Version: fs-repo@10
Was there a change in how the pinset CID is saved between 0.4.13 and 0.6.0? I never tried using go-ipfs@0.4.13 on the data dir to see if it had the pins before migrating.
I also made a really simple datastore debugging tool https://github.com/aschmahmann/ipfs-ds. Running ./ipfs-ds get --base=base58btc /local/pins will spit out the local pin encoded as a base58btc multibase (i.e. in this case it’ll be a CIDv0 with a z tacked onto the front of it)
Seems like the pin verify command should also list out the CID that it tried to use to look up pins. Maybe the new installation is just pointing to the wrong “pins CID” right?
BTW, I always use ‘rsync’ instead of ‘scp’ for moving files, because you can repeat it later, and it only copies the changed data.
I found the pin CID:
When I attempt to cat it I get:
ipfs cat /ipfs/QmSmg6FMmX4PCxWYE67iybUurBccHaGry3NNRPoYds9HZ1: proto: required field "Type" not set
Could be that I’m not supposed to be able to cat the pins file
Another thing, I didn’t stop my ipfs daemon when I ran the scp command to copy over the files. Could that have prevented anything from being copied over?
I tried connecting a v0.4.13 to the unmigrated backup and I’m also getting an empty keys object so it looks like the pins just were not copied over.