Created
March 25, 2016 04:28
-
-
Save eMahtab/3a1c1e83ccabc734b1c7 to your computer and use it in GitHub Desktop.
Loading Documents in a JavaScript Variable - A hack to create a Backup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b = db.products_bak; db.products.find().forEach( function(o){ b.insert(o) } ) | |
// check it worked: | |
b.count() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment