Go utility program for day-to-day Mongo backups. Used by countgo.
- General idea:
- Execute
mongodumpcommand - Generated
.bsonfile upload to S3 - Delete files older than 3 days from S3
- Execute
- Make config.yaml based on config-template.yaml
file_nameis the relative path of the.bsondocumentcron_timeis the cron expression (eg.0 30 6 * * *for 6:30 AM)
go build./cron3 2>> log &
go test -test.v
mongorestore -d aracki -c visitors /path/file.bson
docker run --name mongo --rm -p 27017:27017 mongo:latest