Public Repository

Last pushed: a year ago
Short Description
A simple Docker image that backs up your Mongo data to a Google Cloud bucket periodically
Full Description

Example Usage

docker run -d --restart=always --name mongo_backup \
  -e PROJECT_ID=google_project_id \
  -e KEYFILEJSON='{"type": "service_account", "project_id": "google_project_id", "private_key_id": <PRIVATE KEY>, ... }' \
  -e MONGO_HOST=mongodb://localhost:27017 \
  -e MONGO_DB=dbname \
  -e CRONTIME='00 00 00 00 * *'


ENV Variable Description Default
PROJECT_ID Google cloud project id Required
KEYFILEJSON String containing the Google cloud JSON keyfile Required
BUCKET Name for the bucket must be lowercase Optional => Default: PROJECT_ID.MONGO_DB
MONGO_HOST Host DB: Eg: mongodb://localhost:27017 Required
MONGO_DB Name of DB to backup Required
ENVIRONMENT Additional param to add to the name of your db Optional
CRONTIME When and how frequently to perform the backup Optional => Default: `00 00 00 ` (once a day at midnight based on PST)*
Docker Pull Command