Skip to content
/ cron3 Public

Go utility program for day-to-day Mongo backups.

Notifications You must be signed in to change notification settings

Aracki/cron3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cron3

Go utility program for day-to-day Mongo backups. Used by countgo.

  • General idea:
    • Execute mongodump command
    • Generated .bson file upload to S3
    • Delete files older than 3 days from S3

Install

  • Make config.yaml based on config-template.yaml
  • file_name is the relative path of the .bson document
  • cron_time is the cron expression (eg. 0 30 6 * * * for 6:30 AM)

Usage

Run

  • go build
  • ./cron3 2>> log &

Run test

  • go test -test.v

Import a .bson file into a mongo database

  • mongorestore -d aracki -c visitors /path/file.bson

Run mongo in a docker container

  • docker run --name mongo --rm -p 27017:27017 mongo:latest

About

Go utility program for day-to-day Mongo backups.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages