Extracting all files out of OCIS directory structure ? (future proofing)

Question:
I want to know if there is an existing (cli) command or binary program that a devOps person can use to extract all the files from the internal ocis hash directory structure back into a plain old file system (e.g. ext4)

Use Case;
An organisation or individual has decided to either stop using ocis
-or- perhaps just needs to stop using a particular library in ocis.
-or- needs an efficient way to export all files to a regular file system structure for use elsewhere.

I understand how and why ocis is storing the files via its internal hash structure (essentially the same method used by git or git-annex etc) and it is this last example I am thinking of in particular.

git-annex has an “unannex” option, that a user can use if they decide they don’t want to use git-annex anymore. They can run the git annex uninit and all their previously annexed files with be unwound from the hashed directory structure into a simple plain old file system like ext4 etc.
The data files can then be used elsewhere.
cross ref: git-annex-uninit at branchable [dot] com

I appreciate that files can be downloaded from the UI, but I presume there are

  • size limits to these downloadable compressed archives

  • it would be inconvenient &inefficient to have to manually download all files from server to a client machine in such a piecemeal fashion.

For future proofing reasons it would be desirable to have the ability to directly export/convert the internal ocis hash file structure back to a regular file system file structure (ext4) so that the files could be used outside of ocis.

So, I’m wondering if this is currently possible?

Thanks.

No such a tool does not exist at the moment. One could setup an additional posixfs storage driver and then move the files to there. But without a running ocis instance and a workaround this is not possible.

1 Like

Thanks, I appreciate the reply,
Okay, in that case I’ll start looking at home-grown solution (when have time)
I’m assuming the existing UI download functionality could be reused with a recursive directory traversal to extract all the file etc
Will post update/ pull request to github if/when I have something.
Thanks again !

1 Like