Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Reusing Open Food Facts Data
(view source)
Revision as of 09:01, 12 July 2024
708 bytes added
,
12 July
New doc to import MongoDB dump
Line 184:
Line 184:
==== Import Open Food Facts MongoDB dump into MongoDB ====
==== Import Open Food Facts MongoDB dump into MongoDB ====
+
<pre>
+
# Download
+
wget https://static.openfoodfacts.org/data/openfoodfacts-mongodbdump.gz
+
+
# Import (no need to uncompress)
+
# --nsFrom=off.products # source of the database / collection
+
# --nsTo=mydatabase.mycollection # local database / collection
+
# --drop # Before restoring the collections from the dumped backup, drops the collections from the target database.
+
# # --drop does not drop collections that are not in the backup.
+
mongorestore -vvvvv --gzip --archive="./openfoodfacts-mongodbdump.gz" --nsFrom=off.products --nsTo=mydatabase.mycollection --drop
+
</pre>
+
+
==== (Deprecated) Import Open Food Facts MongoDB dump into MongoDB ====
<pre>
<pre>
# Download and decompress the dump
# Download and decompress the dump
Charlesnepote
Bureaucrats
,
Administrators
984
edits
Navigation menu
Personal tools
English
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Log in
Open Food Facts galaxy
📍Where am I?
🍊Open Food Facts website
Open Food Facts wiki
Main page
Recent changes
Random page
🧴 Open Beauty Facts wiki
Main page
Deep dive per topic
All topics
Whole wiki
Help about MediaWiki
Icons in the wiki
Tools
Special pages
Printable version
Admins
Edit sidebar
Styling
Replace text
Special Pages