Skip to content

apigeeks-com/mongodump-s3-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Image for MongoDB AWS S3 backups based on Alpine Linux, mongodump and awscli

The purpose of this image is to make the backups from EC2 instance that has direct access to backup S3 bucket through proper configured IAM policy.

Use

Environment variables

  • MONGO_URI - MongoDB URI, e.g. mongodb://username:password@host:port/db
  • S3_BUCKET - S3 bucket name where backups will be stored may also include the sub-folder path (e.g.: bucket/sub-folder).

IAM Policy

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Stmt1412000000001",
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::BUCKET_NAME"
            ]
        },
        {
            "Sid": "Stmt1412000000002",
            "Effect": "Allow",
            "Action": [
                "s3:PutObject",
                "s3:PutObjectAcl"
            ],
            "Resource": [
                "arn:aws:s3:::BUCKET_NAME/*"
            ]
        }
    ]
}

About

Docker image to automate mongo dump and upload to AW S3 bucket.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •