Skip to content
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

feat: new dump, aside the current one #7968

Merged
merged 1 commit into from
Jan 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions scripts/mongodb_dump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ cd $DIR

mongoexport --collection products --host $HOST --db $DB | gzip > data/$PREFIX-products.jsonl.gz

mongodump --collection products --host $HOST --db $DB --gzip --archive="data/${PREFIX}-mongodbdump.gz"

mongodump --collection products --host $HOST --db $DB
tar cvfz data/$PREFIX-mongodbdump.tar.gz dump
pushd data/ > /dev/null
sha256sum $PREFIX-mongodbdump.tar.gz > sha256sum
md5sum $PREFIX-mongodbdump.tar.gz > md5sum

sha256sum $PREFIX-mongodbdump.gz > gz-sha256sum
md5sum $PREFIX-mongodbdump.gz > gz-md5sum


# Export delta of products modified in the last 24h or since last run of the script
mkdir -p delta
pushd delta/ > /dev/null
Expand Down