New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mongotools

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongotools

Work In Progress - MongoTools will provide simple command line interface to import/export/clear Mongo documents.

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

MongoTools

Warning ! Work in progress. This package isn't ready for production.

MongoTools is a little shell script that provide command line interface to manage Mongo documents.

With a simple command, you can import, export, clean a Mongo database.
Use this script directly in you shell or add it to grunt or git-hooks.

Installation

You can download the script from Github :

  • With CURL :

      curl -s https://raw.githubusercontent.com/ThierryLag/MongoTools/bash-version/mongotools.sh -o mongotools.sh
    
  • With WGET :

      wget https://raw.githubusercontent.com/ThierryLag/MongoTools/bash-version/mongotools.sh
      
    

Make sure the script is executable:

	chmod a+x mongotools.sh

Settings

Edit the variables below at the beginning of the script :

  • DB_NAME='your-mongo-db' : name of you mongo database
  • DB_COLLECTIONS=( 'your-documents' 'another' ) : array of documents to import/export/clear
  • DATAS_PATH='./_datas' : path where the script store the datas.

Usage

  • Make actions on MongoDB :

      ./mongotools.sh [-o] (actions list)
    

    Execute each listed action in order you want:

    • export: export database collection in JSON
    • import: import collection from JSON
    • clear: remove all collections from database

    Example: ./mongotools.sh export clear import :
    export collections, then clear DB and finally re-import !

  • Display usage message :

      ./mongotools.sh [-h]
    
  • Display script version :

      ./mongotools.sh [-v | --version]
      
    

License

BashTools is free and unencumbered public domain software.
For more information, see http://unlicense.org/ or the accompanying LICENSE file.

Keywords

FAQs

Package last updated on 29 May 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc