mongodb - get Files from Mongo GridFS in bash Script -
is in bash script possible files, based on objectid, stored on in mongo gridfs databse.
with following command can binairy data chunks.
objectid=objectid("5608dd301a8014a568f71921"); mongo localhost:27020/test_files --eval 'db.fs.chunks.find({"files_id":'${objectid}'},{"data":1,"_id":0}).limit(1).foreach(printjson)';
but want have binairy data stored in text file on filesystem, based on objectid. possible?
Comments
Post a Comment