Docker Image for MongoDB AWS S3 backups based on Alpine Linux, mongodump and awscli
MONGO_HOST
- MongoDB hostname.S3_BUCKET
- S3 bucket name where backups will be stored.S3_PATH
- Path in your bucket where backups will be stored.
IAM Policy you need to add to IAM user. Please change BUCKET_NAME
to your S3 bucket name.
{
"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/*"
]
}
]
}