Skip to content

This repo just open to ideas, it's created for anyone who needs a mongoDB collection cloner.

License

Notifications You must be signed in to change notification settings

samueltesfayegari/MongoDB-cloner-TS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MongoDB-cloner-TS

This repo just open to ideas, it's created for anyone who needs a mongoDB collection cloner.

A simple utility to clone MongoDB collections from a local database to a remote production database.

Features

  • Copies collections from one MongoDB instance to another.
  • Uses environment variables for configuration.

Installation

  1. Clone the repository:

    git clone https://github.com/samueltesfayegari/MongoDB-cloner-TS.git
  2. Install dependencies:

    cd MongoDB-cloner-TS 
    npm install
  3. Create a .env file in the root directory with the following: LOCAL_DB_URL=mongodb://localhost:27017/yourLocalDb DATABASE_URL=mongodb+srv://yourProductionDbUri

Usage

Run the script:

node copy-collection.ts

About

This repo just open to ideas, it's created for anyone who needs a mongoDB collection cloner.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published