Skip to content

minio-backup-s3 - is a service giving you ability to mirror entities from SOURCE OBJECT STORAGE to DESTINATION OBJECT STORAGE.

License

Notifications You must be signed in to change notification settings

Salvoxia/minio-backup-s3

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIT license Docker

MinIO Backup S3

minio-backup-s3 is a service giving you ability to mirror entities from SOURCE OBJECT STORAGE to DESTINATION OBJECT STORAGE.

Docker

For a single run:

docker run -e MC_SOURCE_EP_ACCESS_KEY=<Access Key> -e MC_SOURCE_EP_SECRET_KEY=<Secret Key> -e MC_SOURCE_EP_HOST=https://<YOUR-S3-ENDPOINT> -e MC_DEST_EP_ACCESS_KEY=<Access Key> -e MC_DEST_EP_SECRET_KEY=<Secret Key> -e MC_DEST_EP_HOST=https://<YOUR-S3-ENDPOINT> salvoxia/minio-backup-s3:<IMAGE_VERSION>

For mirroring to happen on a schedule:

docker run -e MC_SOURCE_EP_ACCESS_KEY=<Access Key> -e MC_SOURCE_EP_SECRET_KEY=<Secret Key> -e MC_SOURCE_EP_HOST=https://<YOUR-S3-ENDPOINT> -e MC_DEST_EP_ACCESS_KEY=<Access Key> -e MC_DEST_EP_SECRET_KEY=<Secret Key> -e MC_DEST_EP_HOST=https://<YOUR-S3-ENDPOINT> -e CRON_EXPRESSION="0 * * * *" salvoxia/minio-backup-s3:<IMAGE_VERSION>

Kubernetes Cronjob Manifest

The following manifest can be used to create a Kubernetes Cronjob performing mirroring on a schedule.
Apply with kubectl apply -f <FILE_NAME>.yaml.

apiVersion: batch/v1
kind: CronJob
metadata:
  name: minio-backup
  namespace: minio
spec:
  schedule: "* * * * *"
  jobTemplate:
    spec:      
      template:
        spec:
          containers:
            - name: minio-backup-s3
              image: salvoxia/minio-backup-s3:latest
              env:
                - name: MC_SOURCE_EP_ACCESS_KEY
                  value: xxxxxxxxxxxxxxxxxx
                - name: MC_SOURCE_EP_SECRET_KEY
                  value: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
                - name: MC_SOURCE_EP_HOST
                  value: https://minio-source
                - name: MC_DEST_EP_ACCESS_KEY
                  value: xxxxxxxxxxxxxxxxxx
                - name: MC_DEST_EP_SECRET_KEY
                  value: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
                - name: MC_DEST_EP_HOST
                  value: https://minio-dest
          restartPolicy: Never

Environment Variables

Variable Mandatory? Description
MC_SOURCE_EP_ACCESS_KEY yes Access Key for source MinIO instance
MC_SOURCE_EP_SECRET_KEY yes Secret Key for source MinIO instance
MC_SOURCE_EP_HOST yes MinIO source endpoint url
MC_DEST_EP_ACCESS_KEY yes Access Key for destination MinIO instance
MC_DEST_EP_SECRET_KEY yes Secret Key for destination MinIO instance
MC_DEST_EP_HOST yes MinIO destination endpoint url
MC_INSECURE no Set to 1 to disable TLS/SSL certificate verification by MinIO client (calls mc --insecure)
MC_MIRROR_OVERWRITE no Set to 1 to overwrite existing items in the destination (calls mc mirror --overwrite)
CRON_EXPRESSION no A crontab-style expression (e.g. "0 * * * *") to perform mirroring on a schedule (e.g. every hour). If not provided, the container finished after a single run.

About

minio-backup-s3 - is a service giving you ability to mirror entities from SOURCE OBJECT STORAGE to DESTINATION OBJECT STORAGE.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 79.5%
  • Dockerfile 20.5%