Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crazyoptimist/backup-mongo
AWS RDS-like backup system for MongoDB
https://github.com/crazyoptimist/backup-mongo
backup cron mongo rds s3
Last synced: 13 days ago
JSON representation
AWS RDS-like backup system for MongoDB
- Host: GitHub
- URL: https://github.com/crazyoptimist/backup-mongo
- Owner: crazyoptimist
- Created: 2020-12-22T02:52:49.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-02T10:21:41.000Z (over 1 year ago)
- Last Synced: 2024-10-03T21:41:15.098Z (about 1 month ago)
- Topics: backup, cron, mongo, rds, s3
- Language: JavaScript
- Homepage:
- Size: 63.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Backup MongoDB
_AWS RDS-like backup service for mongo_
This application creates complete backups of a MongoDB database.
It behaves like the backup system in AWS RDS, i.e., it removes old backups, then creates a new backup. You can configure the retention period in weeks like in AWS RDS.
It's possible to configure the cron expression according to your needs, refer [cron expression generator](https://crontab.cronhub.io/).
It supports two storage types as of now, `local` and `aws`.
## Deployment
### Configuration
Nothing complex, just create your own `.env` file.
```bash
cp .env.example .env
```### Deploy Using Docker(Compose)
```bash
docker-compose up -d
```### Deploy Using PM2
Have mongodb(version >= 3.6) installed on your operating system first.
```bash
mkdir backups
npm install --global pm2@latest
pm2 start index.js
```## Restoration From Backup Files
```bash
node restore --file=filename.gz --fromDB=aaa --toDB=bbb
```In the command, `filename.gz` is a backup file generated by this application inside the `local_backups` directory.
`aaa` is the original db name, `bbb` is the destination db name, which are optional.
## License
MIT
Coded with :heart: by [crazyoptimist](https://github.com/crazyoptimist)