From 29f215827892a6eb0ee01d4a7f53f7163dcf14ae Mon Sep 17 00:00:00 2001 From: Tim <10128559+znowfox@users.noreply.github.com> Date: Sat, 1 Jun 2024 20:21:43 +0100 Subject: [PATCH 1/2] adding app mongo-backup --- stacks/mongo-backup | 156 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 stacks/mongo-backup diff --git a/stacks/mongo-backup b/stacks/mongo-backup new file mode 100644 index 0000000..aa5891e --- /dev/null +++ b/stacks/mongo-backup @@ -0,0 +1,156 @@ +services: + "{{STACK_NAME}}_mongodb": + image: mongodb + volumes: + - "{{MONGODB_DATA_STORAGE}}:/data/db" + environment: + - "MONGO_INITDB_ROOT_USERNAME={{MONGODB_USER}}" + - "MONGO_INITDB_ROOT_PASSWORD={{MONGODB_PASS}}" + + "{{STACK_NAME}}_mongodb_backup": + image: deenoize/mongodb-backup-s3:latest + links: + - "{{STACK_NAME}}_mongodb:mongodb" + environment: + - "AWS_ACCESS_KEY_ID={{AWS_ACCESS_KEY_ID}}" + - "AWS_SECRET_ACCESS_KEY={{AWS_SECRET_ACCESS_KEY}}" + - "BUCKET={{BUCKET}}" + - "BUCKET_REGION={{BUCKET_REGION}}" + - "BACKUP_FOLDER={{BACKUP_FOLDER}}" + - "MONGODB_HOST={{MONGODB_HOST}}" + - "MONGODB_PORT={{MONGODB_PORT}}" + - "MONGODB_USER={{MONGODB_USER}}" + - "MONGODB_PASS={{MONGODB_PASS}}" + - "MONGODB_DB={{MONGODB_DB}}" + - "EXTRA_OPTS={{EXTRA_OPTS}}" + - "CRON_TIME={{CRON_TIME}}" + - "TZ={{TZ}}" + - "CRON_TZ={{CRON_TZ}}" + - "INIT_BACKUP={{INIT_BACKUP}}" + - "INIT_RESTORE={{INIT_RESTORE}}" + - "DISABLE_CRON={{DISABLE_CRON}}" + volumes: + - "{{LOCAL_BACKUP_PATH}}:/backup" + restart: always + +docs: + logo_url: "https://example.com/path_to_mongodb_backup_logo.png" + name: "MongoDB Backup S3" + description: "Automate MongoDB backups to S3 with periodic execution and AWS v4 auth support." + readme_description: > + ### What is MongoDB Backup S3? + + MongoDB Backup S3 facilitates the automated backup of MongoDB databases directly to S3 storage, supporting AWS S3 v4 authorization, and customizable scheduling through cron. + + ### Features + + - Automated backups via cron job to S3. + - Full support for MongoDB configuration and AWS S3 credentials. + - Options for immediate backup on startup and database restoration from the latest backup. + + ### Links + + - MongoDB Backup S3 Documentation - [mongodb-backup-s3-docs](https://mongodb-backup-s3-docs.com) + + iframe_video_embed: "" + variables: + AWS_ACCESS_KEY_ID: + title: "AWS Access Key ID" + description: "AWS access key for S3 bucket" + default: "" + type: text + AWS_SECRET_ACCESS_KEY: + title: "AWS Secret Access Key" + description: "AWS secret access key for S3 bucket" + default: "" + type: text + BUCKET: + title: "S3 Bucket" + description: "Name of the S3 bucket where backups are stored" + default: "" + type: text + BUCKET_REGION: + title: "S3 Bucket Region" + description: "Region of the S3 bucket if not using the default endpoint" + default: "" + type: text + BACKUP_FOLDER: + title: "Backup Folder" + description: "Folder or path within the S3 bucket where backups are stored" + default: "" + type: text + MONGODB_HOST: + title: "MongoDB Host" + description: "Host or IP address of the MongoDB server" + default: "localhost" + type: text + MONGODB_PORT: + title: "MongoDB Port" + description: "Port number of the MongoDB server" + default: "27017" + type: text + MONGODB_USER: + title: "MongoDB User" + description: "Username for MongoDB" + default: "admin" + type: text + MONGODB_PASS: + title: "MongoDB Password" + description: "Password for MongoDB" + default: "" + type: text + MONGODB_DB: + title: "MongoDB Database" + description: "Specific database to dump, empty for all databases" + default: "" + type: text + EXTRA_OPTS: + title: "Extra mongodump Options" + description: "Additional command-line options for mongodump" + default: "" + type: text + CRON_TIME: + title: "Cron Schedule" + description: "Cron schedule for running backups" + default: "0 3 * * *" + type: text + TZ: + title: "Time Zone" + description: "Time zone used by the container" + default: "US/Eastern" + type: text + CRON_TZ: + title: "Cron Time Zone" + description: "Time zone for the cron scheduler" + default: "US/Eastern" + type: text + INIT_BACKUP: + title: "Initialize Backup" + description: "Create a backup when the container is launched" + default: "false" + type: options + options: + - title: "true" + value: "true" + - title: "false" + value: "false" + INIT_RESTORE: + title: "Initialize Restore" + description: "Restore from the latest backup when the container is launched" + default: "false" + type: options + options: + - title: "true" + value: "true" + - title: "false" + value: "false" + DISABLE_CRON: + title: "Disable Cron" + description: "Disable automated backups if only using for seeding or manual backup/restore" + default: "false" + type: options + options: + - title: "true" + value: "true" + - title: "false" + value: "false" From 7e1408f1afdd6d7cc9e0ffa84ee7d9772642b530 Mon Sep 17 00:00:00 2001 From: Tanmoy Sarkar <57363826+tanmoysrt@users.noreply.github.com> Date: Tue, 4 Jun 2024 23:31:30 +0530 Subject: [PATCH 2/2] feat: mongodb backup added --- assets/logos/mongodb-backup.png | Bin 0 -> 15523 bytes build/mongodb-backup/6.0/Dockerfile | 20 ++++ build/mongodb-backup/6.0/README.md | 75 +++++++++++++ build/mongodb-backup/6.0/run.sh | 46 ++++++++ build/mongodb-backup/7.0/Dockerfile | 20 ++++ build/mongodb-backup/7.0/README.md | 75 +++++++++++++ build/mongodb-backup/7.0/run.sh | 46 ++++++++ stacks/mongo-backup | 156 ---------------------------- stacks/mongodb-backup.yaml | 115 ++++++++++++++++++++ 9 files changed, 397 insertions(+), 156 deletions(-) create mode 100644 assets/logos/mongodb-backup.png create mode 100644 build/mongodb-backup/6.0/Dockerfile create mode 100644 build/mongodb-backup/6.0/README.md create mode 100644 build/mongodb-backup/6.0/run.sh create mode 100644 build/mongodb-backup/7.0/Dockerfile create mode 100644 build/mongodb-backup/7.0/README.md create mode 100644 build/mongodb-backup/7.0/run.sh delete mode 100644 stacks/mongo-backup create mode 100644 stacks/mongodb-backup.yaml diff --git a/assets/logos/mongodb-backup.png b/assets/logos/mongodb-backup.png new file mode 100644 index 0000000000000000000000000000000000000000..a72680a15ef28edef8f33c9c19948822f9932a15 GIT binary patch literal 15523 zcmcJ$WmsKNvNnhW2~O~!!5xBg@Zj$59$XIYBte4*x8T9u4^D6k?(R--XE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wH>@q0ejJ%RibrieXDx#k=`Cf<>-&^e zpohFa85T(C*4u4CG$XgF*?XOSmdz0$k5PeT7|!&7nX=-9mFo9;A*}}(C8y%tE;KaN z?H1%MEg%RP0%QXc0JwSpTt37_hoaO!wr}u(YIp$E97uc}!G3a!aENr?0Bmiao8KpO z1>TXLrZA2~ssewO;>ZK{B1Hc /root/project_env.sh +chmod +x /root/project_env.sh + +echo "=> Creating backup script" +rm -f /backup.sh +cat <> /backup.sh +#!/bin/bash +TIMESTAMP=\`/bin/date +"%Y%m%dT%H%M%S"\` +BACKUP_NAME=\${TIMESTAMP}.dump.gz +S3BACKUP=${S3PATH}\${BACKUP_NAME} + +aws configure set default.s3.signature_version s3v4 +echo "=> Backup started" +if mongodump ${HOST_STR}${PORT_STR}${USER_STR}${PASS_STR}${DB_STR} --archive=\${BACKUP_NAME} --gzip && aws s3 cp \${BACKUP_NAME} \${S3BACKUP} ${REGION_STR} ${ENDPOINT_STR} && rm \${BACKUP_NAME} ;then + echo " > Backup succeeded" +else + echo " > Backup failed" +fi +echo "=> Done" +EOF +chmod +x /backup.sh +echo "=> Backup script created" + +ln -s /backup.sh /usr/bin/backup + +echo "=> Creating a backup on startup" +/backup.sh + + +echo "${CRON_TIME} . /root/project_env.sh; /backup.sh" > /crontab.conf +crontab /crontab.conf +echo "=> Running cron job" +cron diff --git a/build/mongodb-backup/7.0/Dockerfile b/build/mongodb-backup/7.0/Dockerfile new file mode 100644 index 0000000..c870126 --- /dev/null +++ b/build/mongodb-backup/7.0/Dockerfile @@ -0,0 +1,20 @@ +FROM mongo:7.0 + +ENV CRON_TIME="0 0 * * *" \ + TZ=UTC \ + CRON_TZ=UTC + +# Install Python and Cron +RUN \ + apt-get update && \ + apt-get --assume-yes --no-install-recommends install \ + awscli \ + cron && \ + rm -rf \ + /var/lib/apt/lists/* \ + /tmp/* \ + /var/tmp/* + +COPY run.sh /run.sh +RUN chmod +x /run.sh +CMD /run.sh \ No newline at end of file diff --git a/build/mongodb-backup/7.0/README.md b/build/mongodb-backup/7.0/README.md new file mode 100644 index 0000000..8e187fc --- /dev/null +++ b/build/mongodb-backup/7.0/README.md @@ -0,0 +1,75 @@ +# mongodb-backup-s3 + +This is a simplified version of the mongodb-backup-s3 fork https://github.com/kevoj/mongodb-backup-s3. + +Current image supports only `backup` of database. + +--- + +## Example AWS IAM policy + +This policy contains the required permissions for this container to operate. Replace the +`YOUR-BUCKET-HERE` placeholder with your bucket name. +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "VisualEditor0", + "Effect": "Allow", + "Action": [ + "s3:PutObject", + "s3:GetObject", + "s3:ListBucket", + "s3:DeleteObject" + ], + "Resource": [ + "arn:aws:s3:::YOUR-BUCKET-HERE", + "arn:aws:s3:::YOUR-BUCKET-HERE/*" + ] + } + ] +} +``` + +## Parameters + +`AWS_ACCESS_KEY_ID` - your aws access key id (for your s3 bucket) + +`AWS_SECRET_ACCESS_KEY`: - your aws secret access key (for your s3 bucket) + +`BUCKET`: - your s3 bucket + +`BUCKET_REGION`: - your s3 bucket' region (eg `us-east-2` for Ohio). Optional. Add if you get an error `A client error (PermanentRedirect)` + +`ENDPOINT_URL`: - your custom S3 endpoint (eg `https://radosgw.example.com` ) + +`BUCKET_PREFIX`: - name of folder or path to put backups (eg `myapp/db_backups/`). defaults to root of bucket. + +`MONGODB_HOST` - the host/ip of your mongodb database + +`MONGODB_PORT` - the port number of your mongodb database + +`MONGODB_USER` - the username of your mongodb database. I + +`MONGODB_PASS` - the password of your mongodb database + +`MONGODB_DB` - the database name to dump. If not specified, it will dump all the databases + +`CRON_TIME` - the interval of cron job to run mongodump. `0 3 * * *` by default, which is every day at 03:00hrs. + +`INIT_BACKUP` - if set, create a backup when the container launched + + + +## Acknowledgements + +Fork tree +``` +https://github.com/halvves/mongodb-backup-s3 + └─ https://github.com/deenoize/mongodb-backup-s3 + └─ https://github.com/chobostar/mongodb-backup-s3 + └─ https://github.com/zhonghuiwen/mongodb-backup-s3 + └─ https://github.com/kevoj/mongodb-backup-s3 + └─ this fork +``` \ No newline at end of file diff --git a/build/mongodb-backup/7.0/run.sh b/build/mongodb-backup/7.0/run.sh new file mode 100644 index 0000000..418eba7 --- /dev/null +++ b/build/mongodb-backup/7.0/run.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +S3PATH="s3://$BUCKET/$BUCKET_PREFIX" + +[[ ( -n "${ENDPOINT_URL}" ) ]] && ENDPOINT_STR=" --endpoint-url ${ENDPOINT_URL}" +[[ ( -n "${BUCKET_REGION}" ) ]] && REGION_STR=" --region ${BUCKET_REGION}" +[[ ( -n "${MONGODB_USER}" ) ]] && USER_STR=" --username ${MONGODB_USER}" +[[ ( -n "${MONGODB_PASS}" ) ]] && PASS_STR=" --password ${MONGODB_PASS}" +[[ ( -n "${MONGODB_DB}" ) ]] && DB_STR=" --db ${MONGODB_DB}" +[[ ( -n "${MONGODB_PORT}" ) ]] && PORT_STR=" --port ${MONGODB_PORT}" +[[ ( -n "${MONGODB_HOST}" ) ]] && HOST_STR=" --host ${MONGODB_HOST}" + +# Export AWS Credentials into env file for cron job +printenv | sed 's/^\([a-zA-Z0-9_]*\)=\(.*\)$/export \1="\2"/g' | grep -E "^export AWS" > /root/project_env.sh +chmod +x /root/project_env.sh + +echo "=> Creating backup script" +rm -f /backup.sh +cat <> /backup.sh +#!/bin/bash +TIMESTAMP=\`/bin/date +"%Y%m%dT%H%M%S"\` +BACKUP_NAME=\${TIMESTAMP}.dump.gz +S3BACKUP=${S3PATH}\${BACKUP_NAME} + +aws configure set default.s3.signature_version s3v4 +echo "=> Backup started" +if mongodump ${HOST_STR}${PORT_STR}${USER_STR}${PASS_STR}${DB_STR} --archive=\${BACKUP_NAME} --gzip && aws s3 cp \${BACKUP_NAME} \${S3BACKUP} ${REGION_STR} ${ENDPOINT_STR} && rm \${BACKUP_NAME} ;then + echo " > Backup succeeded" +else + echo " > Backup failed" +fi +echo "=> Done" +EOF +chmod +x /backup.sh +echo "=> Backup script created" + +ln -s /backup.sh /usr/bin/backup + +echo "=> Creating a backup on startup" +/backup.sh + + +echo "${CRON_TIME} . /root/project_env.sh; /backup.sh" > /crontab.conf +crontab /crontab.conf +echo "=> Running cron job" +cron diff --git a/stacks/mongo-backup b/stacks/mongo-backup deleted file mode 100644 index aa5891e..0000000 --- a/stacks/mongo-backup +++ /dev/null @@ -1,156 +0,0 @@ -services: - "{{STACK_NAME}}_mongodb": - image: mongodb - volumes: - - "{{MONGODB_DATA_STORAGE}}:/data/db" - environment: - - "MONGO_INITDB_ROOT_USERNAME={{MONGODB_USER}}" - - "MONGO_INITDB_ROOT_PASSWORD={{MONGODB_PASS}}" - - "{{STACK_NAME}}_mongodb_backup": - image: deenoize/mongodb-backup-s3:latest - links: - - "{{STACK_NAME}}_mongodb:mongodb" - environment: - - "AWS_ACCESS_KEY_ID={{AWS_ACCESS_KEY_ID}}" - - "AWS_SECRET_ACCESS_KEY={{AWS_SECRET_ACCESS_KEY}}" - - "BUCKET={{BUCKET}}" - - "BUCKET_REGION={{BUCKET_REGION}}" - - "BACKUP_FOLDER={{BACKUP_FOLDER}}" - - "MONGODB_HOST={{MONGODB_HOST}}" - - "MONGODB_PORT={{MONGODB_PORT}}" - - "MONGODB_USER={{MONGODB_USER}}" - - "MONGODB_PASS={{MONGODB_PASS}}" - - "MONGODB_DB={{MONGODB_DB}}" - - "EXTRA_OPTS={{EXTRA_OPTS}}" - - "CRON_TIME={{CRON_TIME}}" - - "TZ={{TZ}}" - - "CRON_TZ={{CRON_TZ}}" - - "INIT_BACKUP={{INIT_BACKUP}}" - - "INIT_RESTORE={{INIT_RESTORE}}" - - "DISABLE_CRON={{DISABLE_CRON}}" - volumes: - - "{{LOCAL_BACKUP_PATH}}:/backup" - restart: always - -docs: - logo_url: "https://example.com/path_to_mongodb_backup_logo.png" - name: "MongoDB Backup S3" - description: "Automate MongoDB backups to S3 with periodic execution and AWS v4 auth support." - readme_description: > - ### What is MongoDB Backup S3? - - MongoDB Backup S3 facilitates the automated backup of MongoDB databases directly to S3 storage, supporting AWS S3 v4 authorization, and customizable scheduling through cron. - - ### Features - - - Automated backups via cron job to S3. - - Full support for MongoDB configuration and AWS S3 credentials. - - Options for immediate backup on startup and database restoration from the latest backup. - - ### Links - - - MongoDB Backup S3 Documentation - [mongodb-backup-s3-docs](https://mongodb-backup-s3-docs.com) - - iframe_video_embed: "" - variables: - AWS_ACCESS_KEY_ID: - title: "AWS Access Key ID" - description: "AWS access key for S3 bucket" - default: "" - type: text - AWS_SECRET_ACCESS_KEY: - title: "AWS Secret Access Key" - description: "AWS secret access key for S3 bucket" - default: "" - type: text - BUCKET: - title: "S3 Bucket" - description: "Name of the S3 bucket where backups are stored" - default: "" - type: text - BUCKET_REGION: - title: "S3 Bucket Region" - description: "Region of the S3 bucket if not using the default endpoint" - default: "" - type: text - BACKUP_FOLDER: - title: "Backup Folder" - description: "Folder or path within the S3 bucket where backups are stored" - default: "" - type: text - MONGODB_HOST: - title: "MongoDB Host" - description: "Host or IP address of the MongoDB server" - default: "localhost" - type: text - MONGODB_PORT: - title: "MongoDB Port" - description: "Port number of the MongoDB server" - default: "27017" - type: text - MONGODB_USER: - title: "MongoDB User" - description: "Username for MongoDB" - default: "admin" - type: text - MONGODB_PASS: - title: "MongoDB Password" - description: "Password for MongoDB" - default: "" - type: text - MONGODB_DB: - title: "MongoDB Database" - description: "Specific database to dump, empty for all databases" - default: "" - type: text - EXTRA_OPTS: - title: "Extra mongodump Options" - description: "Additional command-line options for mongodump" - default: "" - type: text - CRON_TIME: - title: "Cron Schedule" - description: "Cron schedule for running backups" - default: "0 3 * * *" - type: text - TZ: - title: "Time Zone" - description: "Time zone used by the container" - default: "US/Eastern" - type: text - CRON_TZ: - title: "Cron Time Zone" - description: "Time zone for the cron scheduler" - default: "US/Eastern" - type: text - INIT_BACKUP: - title: "Initialize Backup" - description: "Create a backup when the container is launched" - default: "false" - type: options - options: - - title: "true" - value: "true" - - title: "false" - value: "false" - INIT_RESTORE: - title: "Initialize Restore" - description: "Restore from the latest backup when the container is launched" - default: "false" - type: options - options: - - title: "true" - value: "true" - - title: "false" - value: "false" - DISABLE_CRON: - title: "Disable Cron" - description: "Disable automated backups if only using for seeding or manual backup/restore" - default: "false" - type: options - options: - - title: "true" - value: "true" - - title: "false" - value: "false" diff --git a/stacks/mongodb-backup.yaml b/stacks/mongodb-backup.yaml new file mode 100644 index 0000000..a0d95a5 --- /dev/null +++ b/stacks/mongodb-backup.yaml @@ -0,0 +1,115 @@ +services: + "{{STACK_NAME}}": + image: ghcr.io/swiftwave-org/app-store/mongodb-backup:7.0 + environment: + - "AWS_ACCESS_KEY_ID={{S3_ACCESS_KEY_ID}}" + - "AWS_SECRET_ACCESS_KEY={{S3_SECRET_ACCESS_KEY}}" + - "ENDPOINT_URL={{S3_ENDPOINT}}" + - "BUCKET={{S3_BUCKET}}" + - "BUCKET_REGION={{S3_DEFAULT_REGION}}" + - "BUCKET_PREFIX={{S3_PREFIX}}" + - "MONGODB_HOST={{DB_SERVER}}" + - "MONGODB_PORT={{DB_PORT}}" + - "MONGODB_USER={{DB_USER}}" + - "MONGODB_PASS={{DB_PASS}}" + - "MONGODB_DB={{DB_NAME}}" + - "CRON_TIME={{CRON_TIME}}" +docs: + logo_url: "https://raw.githubusercontent.com/swiftwave-org/app-store/main/assets/logos/mongodb-backup.png" + name: "MongoDB Backup S3" + description: "Automate MongoDB backups to S3 with periodic execution" + readme_description: > + ### What is MongoDB Backup S3? + + MongoDB Backup S3 facilitates the automated backup of MongoDB databases directly to S3 storage, supporting AWS S3 v4 authorization, and customizable scheduling through cron. + + ### Features + + - Automated backups via cron job to S3 + immediate backup on startup + - Full support for MongoDB configuration and AWS S3 credentials. + + iframe_video_embed: "" + variables: + VERSION: + title: "Version" + description: "Version of the image" + default: "7.0" + type: options + options: + - title: "7.0" + value: "7.0" + - title: "6.0" + value: "6.0" + CRON_TIME: + title: "Backup Schedule" + description: "Cron schedule for automated backups" + default: "0 0 * * *" + type: options + options: + - title: "Hourly" + value: "0 * * * *" + - title: "Every 6 Hours" + value: "0 */6 * * *" + - title: "Daily" + value: "0 0 * * *" + - title: "Every Sunday" + value: "0 0 * * 0" + - title: "Monthly" + value: "0 0 1 * *" + - title: "Yearly" + value: "0 0 1 1 *" + S3_ENDPOINT: + title: "S3 Endpoint" + description: "Endpoint of the S3 bucket" + default: "" + type: text + S3_DEFAULT_REGION: + title: "S3 Region" + description: "Region where the S3 bucket is located" + default: "us-east-1" + type: text + S3_ACCESS_KEY_ID: + title: "S3 Access Key ID" + description: "Access key ID for S3" + default: "" + type: text + S3_SECRET_ACCESS_KEY: + title: "S3 Secret Access Key" + description: "Secret access key for S3" + default: "" + type: text + S3_BUCKET: + title: "S3 Bucket Name" + description: "Name of the S3 bucket where backups will be stored" + default: "" + type: text + S3_PREFIX: + title: "S3 Prefix" + description: "Prefix path under the S3 bucket where backups will be stored" + default: "backup" + type: text + DB_SERVER: + title: "Database Host" + description: "Host of mongodb server" + default: "" + type: text + DB_PORT: + title: "Database Port" + description: "Port number for the database" + default: "27017" + type: text + DB_NAME: + title: "Database Name" + description: "Name of the database to backup" + default: "" + type: text + DB_USER: + title: "Database User" + description: "Username for the database" + default: "" + type: text + DB_PASS: + title: "Database Password" + description: "Password for the database user" + default: "" + type: text