https://github.com/codemeapixel/mongo-2-postgres
https://github.com/codemeapixel/mongo-2-postgres
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/codemeapixel/mongo-2-postgres
- Owner: CodeMeAPixel
- License: mit
- Created: 2022-05-31T20:49:20.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-31T20:49:22.000Z (almost 4 years ago)
- Last Synced: 2025-08-10T03:56:08.445Z (7 months ago)
- Language: Go
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
Mongo to PostgreSQL
Simple cli used to backup and migrate data from Mongoose to Postgres on a Rotating/Rolling basis.
[](https://github.com/InfinityBotList/Mongo-2-Postgres)
[](https://github.com/InfinityBotList/Mongo-2-Postgres)
[](https://github.com/InfinityBotList/Mongo-2-Postgres)
---
## Setup
• Check back soon!
---
## Usage
| Command | Description | Example |
| ------------ | ------------------------------------------------------------- | ---------------------------------------------- |
| `help ` | List available commands and their usage | `./db-backup-tool --help` |
| `act` | Specify an action to perform (backup/watch) | `./db-backup-tool --act watch` |
| `backup-db` | Specify the Postgres Connection String. | `./db-backup-tool --backup-db POSTGRES_URL` |
| `conn` | Specify the Mongoose Connection String. | `./db-backup-tool --conn MONGO_URL` |
| `dbname` | Specify the Mongoose Database Name. | `./db-backup-tool --dbname MONGO_NAME` |
| `interval` | Interval for watcher to wait for (default 60 mins). | `./db-backup-tool --interval SOME_INT` |
---
## Example Watch Output
```
DBTool: init
DBTool: Connecting to mongodb://127.0.0.1:27017/infinity
Connected to mongoDB?
Collections in DB: [packages staff_apps dev_apps users reviews transcripts sessions tickets oauths suggests bots votes]
DBTool: Connected to mongo successfully
Backing up packages
Backing up staff_apps
Backing up dev_apps
Backing up users
Backing up reviews
Backing up transcripts
Ignoring sessions as it is in ignoredCols
Backing up tickets
Backing up oauths
Backing up suggests
Backing up bots
Backing up votes
Waiting for next backup rotation
```