ipfsfiled
A daemon to watch a filesystem and ensure the files it contains are accessible over IPFS.
Overview
ipfsfiled is designed to serve the contents of large, mostly-static filesystems over IPFS without duplicating all of data into a blockstore.
Each file in the filesystem is decomposed into filestore blocks that directly reference the bytes on disk.
This keeps the blockstore lightweight and avoids the need to copy large volumes of data into the store.
ipfsfiled uses mfs to maintain a unix-like merkledag filesystem that corresponds to the disk filesystem being monitored.
The structure of the monitored filesystem is directly mirrored in the merkledag so that files on the filesystem may be retrieved over IPFS by requesting its path extending from the root CID.
For example, a file on disk at <watched directory>/sub/folder/file.bin
may be retrieved by using <root cid>/sub/folder/file.bin
.
The root CID is updated each time the monitored filesystem changes.
Getting Started
As of Go 1.18, install the latest ipfsfiled executable using:
go install github.com/iand/ipfsfiled@latest
This will download and build an ipfsfiled binary in $GOBIN
Run the daemon by executing $GOBIN/ipfsfiled
and use flags to configure its operation:
--ipfs-datastore
- path that will contain the ipfsfiled blockstore
--ipfs-fileroot
- path to the top level directory to be monitored
Contributing
Welcoming new issues and pull requests.
License
This software is dual-licensed under Apache 2.0 and MIT terms: