mgfs is a FUSE filesystem which uses MongoDB GridFS as a storage backend.
You need to have Golang installed.
Open your terminal, and run go get github.com/amsa/mgfs
. Now you should be able to run mgfs
(be sure to add $GOPATH/bin to your $PATH).
First mount your MongoDb database: mgfs test /path/to/mount/dir
. You may now go to the directory specified
as the mount point, and see the collections (directories), and documents (json files). You may read, update,
or delete the documents. You may also read and delete GridFs files under the specified prefix (fs
by default).
Don't forget to unmount the database when you are done (umount /path/to/mount/dir
).
There is no caching layer implemented in-process or externally (eg. Redis or Memcached). As long as MongoDB is close to your FUSE process latency wise, you should have no issues. PRs are welcome to implement caching if there is interest :)
- Make any code changes required
test.sh
will put you in a shell in a container, with access to MongoDB (it runsdocker-compose up -d
within test.sh)./app -a $MONGODB_HOST -p 27017 -b databasename -m mountpoint/
- Support GridFS read
- Support GridFS remove
- Support GridFS write
- Show GridFS file names