mongo-dump-stream | Pipe entire mongodb databases through the shell | Runtime Evironment library
kandi X-RAY | mongo-dump-stream Summary
kandi X-RAY | mongo-dump-stream Summary
. DEPRECATED FOR NEW PROJECTS. Newer versions of MongoDB (3.2.x) have equivalent utilities, and also fail to restore databases dumped with this utility.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of mongo-dump-stream
mongo-dump-stream Key Features
mongo-dump-stream Examples and Code Snippets
Community Discussions
Trending Discussions on mongo-dump-stream
QUESTION
Problem:
I try to build a backup solution for Azure Cosmos DB that gives us DB dumps on a regular basis in case we programmatically corrupt the data in our database. The issue is that Data Factory does not (yet) exist for Azure Germany and we cannot rely on the automatic backups from Azure (that are only available for 8 hours). I do not want to use any extra applications outside the cloud.
What I found so far:
https://www.npmjs.com/package/mongo-dump-stream
Mongo Dump Stream should be able to connect to our DB and read from it.
My idea is to use this npm from within Azure Functions and send the result of the dump to a blob storage.
My question:
How can I send the result to a blob storage?
Can you give an example for concrete implementation?
...ANSWER
Answered 2018-Sep-01 at 09:38Here is the idea:
Do not create backup for the whole collection but for changes (delta), and save changes that happened over time. Later you can implement restore mechanism that will walk through the delta files.
Here is how implementation looks as a concept but only for the backup mechnism that you requested:
Here is the dedicate repo for that. I also added Azure CLI script to help you quickly reproduce my idea in your Azure tenant.
General description:
- Dependencies:
azure-storage, unix-timestamp, documentdb
- I have a time triggered function. The frequency creates blobs named by datetime stamp.
- I store last import time in storage table.
- To get delta I use
_ts
field of any document in CosmosDb.
Benefits of this approach:
- delta-s are lighter and will be faster to import/backup
- you can set frequency of your delta generation
- you can see database in different states when you restore
Drawbacks:
- you do not have one single file to restore but many
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install mongo-dump-stream
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page