https://github.com/marmelab/mongo-serverless-s3-rolling-backup
Serverless scheduled rolling backups from mongo to s3
https://github.com/marmelab/mongo-serverless-s3-rolling-backup
Last synced: 3 months ago
JSON representation
Serverless scheduled rolling backups from mongo to s3
- Host: GitHub
- URL: https://github.com/marmelab/mongo-serverless-s3-rolling-backup
- Owner: marmelab
- License: mit
- Created: 2019-09-03T15:49:59.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-03T15:52:25.000Z (almost 6 years ago)
- Last Synced: 2025-02-17T02:53:25.406Z (4 months ago)
- Language: JavaScript
- Size: 6.9 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mongo-serverless-s3-rolling-backup
Serverless scheduled rolling backups from mongo to s3
Inspired from [alonhar/lambda-mongodb-s3-backup](https://github.com/alonhar/lambda-mongodb-s3-backup).
## Usage
### Install
```
npm install
```### Deploy
```
npm run deploy
```Don't forget to set environment variables:
- MONGO_URL: [mongo connection string](https://docs.mongodb.com/manual/reference/connection-string/)
- S3_PATH: path as [S3Uri](https://docs.aws.amazon.com/cli/latest/reference/s3/index.html#path-argument-type)
- S3_NAME: name of your bucket
- SCHEDULE: [schedule expression](https://docs.aws.amazon.com/lambda/latest/dg/tutorial-scheduled-events-schedule-expressions.html)
- KEEP: number of backups to keep on s3, oldest will be pruned firstExample:
```
MONGO_URL=mongodb://admin:password@host:57844/database S3_PATH==s3://bucket/production S3_NAME=bucket SCHEDULE=cron(15 10 * * ? *) KEEP=30 npm run deploy
```## Development
Install then run locally:
```
npm run local
```Same environment variables apply.