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

Support for mongodump like output #3

Open
IstoraMandiri opened this issue Sep 18, 2015 · 4 comments
Open

Support for mongodump like output #3

IstoraMandiri opened this issue Sep 18, 2015 · 4 comments
Assignees

Comments

@IstoraMandiri
Copy link

I was wondering whether it would be possible to transform the output to mongodump-like output.

The benefit of this is that you can use mongorestore on the CLI if you wanted to restore to a database created using mongodb-backup, and similarly, it's be cool if mongodb-restore had the ability to read a normal mongodump folder.

This is what mongodump spits out

collectionA.bson
collectionA.meta.json //this file is not required but contains index data
collectionB.bson
collectionB.meta.json
...

And this is what mongodb-backup currently creates

collectionA/
  _idA.bson
  _idB.bson
collectionB/
  _idC.bson
  _idD.bson
...

Would it possible to add directional compatibility for mongodump and mongorestore by implementing this transformation?

@hex7c0
Copy link
Owner

hex7c0 commented Sep 18, 2015

cool idea
it's a breaking change, but can be very useful!

however, if you need a *cli command, you can use mongodb-backup-cli and mongodb-restore-cli for the moment

@IstoraMandiri
Copy link
Author

Needn't be breaking! nativeOutput: true and nativeInput: true would work?

@hex7c0
Copy link
Owner

hex7c0 commented Sep 21, 2015

yes sure!
for the moment output remains the same
maybe (in the future) will be default

@hex7c0 hex7c0 self-assigned this May 14, 2017
@lihaibh
Copy link

lihaibh commented Sep 7, 2020

@hitchcott
If its still relevant my own solution for mongodb backup creates backup that is compatible with the native mongodump
you can basically use mongorestore to restore backups created by my library.
will appreciate contribution!
https://github.com/lihaibh/mongodb-snapshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants