Skip to content

Instantly share code, notes, and snippets.

@eMahtab
Created March 25, 2016 04:28
Show Gist options
  • Save eMahtab/3a1c1e83ccabc734b1c7 to your computer and use it in GitHub Desktop.
Save eMahtab/3a1c1e83ccabc734b1c7 to your computer and use it in GitHub Desktop.
Loading Documents in a JavaScript Variable - A hack to create a Backup
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