New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to restore MongoDB dump without uncompressing it #7962
Comments
As @CharlesNepote asked me about it, it has no impact on Robotoff, which uses directly the MongoDB DB + the daily JSONL export. |
There is an impact on import_prod_data target in Makefile (used in daily action to update stagging mongodb). Also we must advertise the change on the /data page. Otherwise, it's really cool to have it :-) |
I propose to make it in several steps:
|
All fine!
|
I have made other tests: it's working perfectly well. We have to pay attention to #8050, to be sure it does not impact too much on export global workflow. |
@alexgarel: you mentioned:
Could you do it? I'm not very comfortable with makefiles... It seems that the github action is starting at 00:00 so it uses the archive from the previous day and you don't need to take care about the creation time of the file (see #8050). When it's done, I suggest we test it during a few days before going further. |
Using new openfoodfacts-mongodbdump.gz dump to restore staging. Also using a bind mounted directory to avoid copying files around. + fix a bug on daily refresh_products_tags on mongo_dev Part of: #7962
This issue has been open 90 days with no activity. Can you give it a little love by linking it to a parent issue, adding relevant labels and projets, creating a mockup if applicable, adding code pointers from https://github.com/openfoodfacts/openfoodfacts-server/blob/main/.github/labeler.yml, giving it a priority, editing the original issue to have a more comprehensive description… Thank you very much for your contribution to 🍊 Open Food Facts |
@CharlesNepote @alexgarel I think it's time to remove the old mongodb dump: #9946 |
MongoDB dump weights 39GB+ while compressed file weights 6GB+.
Currently, it is necessary to uncompress the compressed file to restore it. Thus, a simple restoration of the Open Food Facts DB is needing (6 + 39) + 39 = 84GB.
But MongoDB allows to dump and restore compressed files without uncompress them, thanks to the --gzip and --archive arguments.
We might use it as:
We just have to change one line in mongodb_dump.sh.
Here are some benchmarks.
@stephanegigandet, @alexgarel, @hangy, @syl10100, @cquest ?
The text was updated successfully, but these errors were encountered: