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

Add ability to update the local root MFS CID? #8100

Open
kallisti5 opened this issue May 1, 2021 · 2 comments · May be fixed by #8648
Open

Add ability to update the local root MFS CID? #8100

kallisti5 opened this issue May 1, 2021 · 2 comments · May be fixed by #8648
Assignees
Labels
kind/enhancement A net-new feature or improvement to an existing feature

Comments

@kallisti5
Copy link

Situation:

  1. I have a workstation with an MFS root that 100 users are mirroring.
  2. My workstation disk explodes.

User:

I'd like to reinstall IPFS, and "recover" that root MFS CID. I know the CID, and the data (and filesystem layout) is available on all the other pinned nodes. I really can't "replicate" my original data structure without changing the MFS layout.

The closest we came in Matrix was:
ipfs files cp $(ipfs resolve -r /ipns/hpkg.haiku-os.org) /hpkg.haiku-os.org

This wouldn't work since it would place the data at /{cid-of-that-dnslink}:
ipfs files cp $(ipfs resolve -r /ipns/hpkg.haiku-os.org) /

@lidel brought up in matrix discussions...

ack, for what its worth, it is also problematic the other way, ipfs files cp /ipns/hpkg.haiku-os.org /hpkg.haiku-os.org would make users think they copied a living directory that will get updated when dnslink gets changed, which is not the case (what is copied is static snapshot)
by requiring an immutable path, at least there is no ambiguity 
Would be cool to have a way to "pin" /ipns/ addrs in a way that follows updates, but its tricky to make a distinction betwen mutable and immutable, when you start mixing them in MFS.
We may end up having a separate primitive for this (some ideas in: https://github.com/ipfs/go-ipfs/issues/4435).
Curiously, this topic got brought up recently in the context of remote pinning services. As we have more services that can be used with pin remote commands, we may look into having ability to "pin" IPNS addr remotely, and have service automatically repin new CID every time IPNS pointer changes. Details TBD, but this sounds like useful pattern for website and dataset hosting.

Others have complained about this before:
https://discuss.ipfs.io/t/update-mfs-root-cid/7644

It looks like someone wrote an external tool to do it:
https://github.com/hsanjuan/mfs-replace-root

@kallisti5 kallisti5 added the kind/enhancement A net-new feature or improvement to an existing feature label May 1, 2021
@schomatis
Copy link
Contributor

This seems like a valid request, would like @lidel or @aschmahmann to confirm before adding it to the weekly candidates.

@schomatis schomatis self-assigned this Dec 23, 2021
@schomatis
Copy link
Contributor

PR in #8648.

@BigLep BigLep moved this to 🔎 In Review in IPFS Shipyard Team Mar 3, 2022
@BigLep BigLep added this to the Best Effort Track milestone Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature
Projects
No open projects
Status: 🔎 In Review
Development

Successfully merging a pull request may close this issue.

3 participants