Git Product home page Git Product logo

minio-metadata's Introduction

Transfer files from MongoDB GridFS to Minio file server, and MongoDB text to SQLite

Introduction

Related, not used here:

Requirements

Installed commands:

Transferring files

  1. Edit settings.sh to change MongoDB, SQLite and Minio settings.

  2. a) Do everything of 2b) at one step

./start.sh

  1. b) Do in separate steps

./mongoexport.sh (Copy text from MongoDB to SQLite)

./transfer.sh (Copy files from MongoDB to Minio)

Logging transfer to textfile:

./transfer.sh > logfile.txt

Looking at transfer progress at other terminal:

tail -f logfile.txt

mc command has command line option to add metadata

Metadata can be added be selected from SQLite database in transfer.sh script.

Metadata needs to need in JSON format properly.

mc command also has SQL to search.

How to remove extra text when looking logfile, not needed working results:

cat logfile.txt | grep -v success | less
  • That -v option removes that kind of text from logfile, only showing errors or other remaining text.
  • In remaining log text can be seen, is there any file transfer errors, or does some file need to be transferred again.
  • To be tested, does exporting newer attachments require different OID1 etc format.

What will happen while tranferring files

  1. Export MongoDB text to wekan.sqlite (Temporary .csv files at directory csv will be deleted after they have been imported to SQLite)

  2. Export file from MongoDB GridFS to current directory

  3. Upload file to Minio

  4. Delete file from current directory, to not fill more disk space.

  5. Go back to step 2. for each file

NOTE: Running scripts again currently will overwrite wekan.sqlite file new data and transfer files to minio again.

TODO

  • Current bugs:
    • When transferring files, some of files are not transferred. Is this bug in mc command, bash script, or MinIO server?
    • When metadata is added, some metadata is missing for some files.
    • Does MinIO not work on ext4 on Linux? minio/minio#16602 (comment)
    • This MinIO bug is problem, someone recommended to not use MinIO because of it minio/minio#9419
    • Would MinIO server AGPLv3 license change WeKan MIT licence to AGPLv3 ? Some recommend staying away from MinIO: https://news.ycombinator.com/item?id=35328316
    • What alternatives there are for MinIO ?
    • Attachment filename sanitize when storing files serverside, like use only ObjectID or hash wekan/wekan#4416
  • Add more metadata to minio.
    • Create SQL query for FILEID
    • For each FILEID, do queries for metadata, like cardname, username, etc
    • Combine metadata to correct JSON file format that is OK to save to minio

minio-metadata's People

Contributors

xet7 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.