ipfs / fs-repo-migrations

Migrations for the filesystem repository of ipfs clients
MIT License
57 stars 42 forks source link

Document upgrade reversion #178

Open kevinaquick opened 1 year ago

kevinaquick commented 1 year ago

We have been updating our IPFS nodes to the latest version using the IPFS updater tool. This installs version 0.22.0. We have had to use the fs-repo-migrations tool as part of this process this was working fine a few days ago on the nodes we were updating. However when repeating this process today on our next node that needs updating, the fs-repo-migrations tool seems to be migrating the repo to a version beyond what the current release of Kubo supports i.e. it is now going to version 15 of the repo (previously it was going to just version 14). As a result kubo won't run and complains about the repo being to new!

What is the solution? can we downgrade the repo with the fs-repo-migration and if so how? It seems to have a repo on 15 you need a version of Kubo beyond what can be installed via the updater tool?

Any help much appreciated

Kevin

aschmahmann commented 1 year ago

@kevinaquick there is currently a released migration that is for an unreleased (but soon to have a release candidate) version of kubo. As a result, upgrading to the "latest" and trying to run a released version of kubo isn't going to work.

However, the fs-repo-migration tool allows both downgrades as well as updating to specific repo versions. From fs-repo-migrations --help

❯ fs-repo-migrations.exe --help
Usage of C:\Users\adin\go\bin\fs-repo-migrations.exe:
  -distpath string
        specify the distributions build to use
  -revert-ok
        allow running migrations backward
  -to string
        repo version to upgrade to, or "latest" for latest repo version (default "latest")
  -v    print latest migration available and exit
  -y    answer yes to all prompts
kevinaquick commented 1 year ago

Thank you for getting back! we did wonder if there were flags that could be specified but there was no details on the web page to suggest it. I assume the flags are the same for the linux version

aschmahmann commented 1 year ago

but there was no details on the web page to suggest it

Did you mean the README on this repo or something else? In my experience a lot of CLI tools tend to just let you explore through something like --help

I assume the flags are the same for the linux version

Yeah the CLI commands (as well as the migrations, and almost all of the features in kubo itself) are cross platform

kevinaquick commented 1 year ago

Thanks for getting back again

FYI The web page I was referring to was

https://github.com/ipfs/fs-repo-migrations/blob/master/run.md

aschmahmann commented 1 year ago

Thanks, that makes sense. If you're able to submit a PR with the docs update that'd be great. Sounds like this was enough to get the issue resolved for you.