Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a downgrading guide doc #10

Closed
wants to merge 2 commits into from

Conversation

RichardLitt
Copy link
Member

Thought this might be useful: I had to ask @diasdavid how to do this.

@@ -0,0 +1,26 @@
## Downgrading IPFS versions

Downgrading your IPFS version (for instance, from 4.0 to 3.8) is not as complicated as upgrading. You can't use the same repository simultaneously for both versions. Here is how you switch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.4.0 and 0.3.8

@RichardLitt
Copy link
Member Author

Added a section for using ipfs-update and a TODO; I can write that, but will need help as I'm unfamiliar with ipfs-update.

@jbenet
Copy link
Member

jbenet commented Dec 15, 2015

Cc @whyrusleeping
On Tue, Dec 15, 2015 at 10:51 Richard Littauer [email protected]
wrote:

Added a section for using ipfs-update and a TODO; I can write that, but
will need help as I'm unfamiliar with ipfs-update.


Reply to this email directly or view it on GitHub
#10 (comment)
.

@whyrusleeping
Copy link
Member

I would add a bit on what the actions taken in your code actually do, your new daemon won't have any of the same data as before.

If you really want to do a downgrade (and not a clean install of an older version) you would have to revert your repo:

$ ipfs-2-to-3 -revert -path=$IPFS_PATH

@jbenet
Copy link
Member

jbenet commented Dec 16, 2015

your new daemon won't have any of the same data as before.

no guide that we give users should ever do this (unless it makes it absolutely clear with a huge warning). i propose we stick to always getting users to downgrade the migration.

we can mention that "you can just get rid of your old repo, or move it to a backup location and init a new node" as a secondary option.

@daviddias
Copy link
Member

Oh, there is a -revert option? nice!

@jbenet
Copy link
Member

jbenet commented Dec 16, 2015

Oh, there is a -revert option? nice!

:)

@RichardLitt
Copy link
Member Author

ipfs-2-to-3 -revert -path=$IPFS_PATH

Does this work for ifps-3-to-4?

@jbenet
Copy link
Member

jbenet commented Dec 16, 2015

yeah they should all be the same. though 3-to-4 isnt merged yet

@RichardLitt
Copy link
Member Author

I think this is the edit suggested, but I am not sure. I've only ever used the method described in the manual section, because that was what was suggested for me. Thoughts?

@whyrusleeping
Copy link
Member

I'll admit the numbering is a tad confusing '2' here refers to ipfs 0.3.*, and '3' refers to ipfs 0.4.0

@jbenet
Copy link
Member

jbenet commented Dec 18, 2015

The numbers are independent sequences. The fs-repo versions 2 and 3
coincide with go-ipfs versions 0.3 and 0.4, but are different numbers.
On Fri, Dec 18, 2015 at 02:28 Jeromy Johnson [email protected]
wrote:

I'll admit the numbering is a tad confusing '2' here refers to ipfs 0.3.*,
and '3' refers to ipfs 0.4.0


Reply to this email directly or view it on GitHub
#10 (comment)
.

@RichardLitt
Copy link
Member Author

So, ipfs-2-to-3 doesn't actually refer to IPFS 2, or 3? That is really confusing. How about ipfs-fs-2-to-3 or something as a name, instead?

@whyrusleeping
Copy link
Member

i mean, thats why its the 'fs-repo-migrations', but yeah. maybe we could rename slightly

@ghost
Copy link

ghost commented Dec 18, 2015

fs-repo-2-to-3 would match fs-repo-migrations. Also just in case: blue! :):)

@jbenet
Copy link
Member

jbenet commented Dec 18, 2015

+1 for fs-repo-2-to-3
On Fri, Dec 18, 2015 at 2:50 PM Lars Gierth [email protected]
wrote:

fs-repo-2-to-3 would match fs-repo-migrations. Also just in case: blue!
:):)


Reply to this email directly or view it on GitHub
#10 (comment)
.

@RichardLitt
Copy link
Member Author

Is that all needs to happen to make that name change a change of the dir_names in this directly from ipfs-* to fs-*?


## Manually downgrading IPFS versions

**You should not have to do this manually. Automatically downgrading is the preferred method.*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One * either too much or too little

@RichardLitt
Copy link
Member Author

Good catch @dignifiedquire, thanks.

@chriscool
Copy link
Contributor

@whyrusleeping or @jbenet could you take a look at merging this? Thanks!


**You should not have to do this manually. Automatically downgrading is the preferred method.**

Manually downgrading your IPFS version (for instance, from `0.4.0` to `0.3.8`) is not as complicated as upgrading. You can't use the same repository simultaneously for both versions. Here is how you switch. Note that this is actually a clean install, and that your daemon won't have the same data as before.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is not downgrading, this is "installing a different version from scratch."

Downgrading the version of a repo MUST ALWAYS preserve all user data.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we make that clear? But I've pushed a slightly different version making this blatant.

@chriscool
Copy link
Contributor

Ping!

@whyrusleeping
Copy link
Member

This should be updated, the instructions it gives are incorrect, it is possible to downgrade safely without losing data using the ipfs-X-to-Y tools. We should document that here.

@RichardLitt
Copy link
Member Author

@whyrusleeping I am confused. It looks like it says that, to me. That's the first section.

@RichardLitt
Copy link
Member Author

@whyrusleeping What do you need from me, here?

```sh
cd $GOPATH/src/github.com/ipfs/go-ipfs
git checkout master # (or the version you want)
go install ./cmd/ipfs
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be make install now

@RichardLitt
Copy link
Member Author

@lgierth Fixed!

cd $GOPATH/src/github.com/ipfs/go-ipfs
git checkout master # (or the version you want)
go install ./cmd/ipfs
make install
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I meant only that go install is make install now :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed again.

@hsanjuan
Copy link
Contributor

This is a bit old, and this repo is probably not the place to document a general downgrade process now we have dedicated websites.

@hsanjuan hsanjuan closed this Jan 30, 2020
@RichardLitt
Copy link
Member Author

Sounds good. Thanks, @hsanjuan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants