Sign inSign up

wehostasia/storage-backup

By wehostasia

Updated almost 2 years ago

This docker image for backup files to DigitalOcean and AWS with specific tag "do-space, aws-s3"

Image
Databases & storage
0

349

wehostasia/storage-backup repository overview

Quick reference

How to use this image

Usage

Use like you would any other base image on kubernetes cluster cronjob:

  • Backup to DigitalOcean Space
---
apiVersion: batch/v1
kind: CronJob
metadata:
  name: backup-storage
spec:
  schedule: "30 23 * * *"
  jobTemplate:
    spec:
      template:
        spec:
          restartPolicy: Never
          containers:
            - name: backup-storage
              image: docker.io/wehostasia/storage-backup:3.20
              imagePullPolicy: Always
              env:
                - name: AWS_ACCESS_KEY_ID
                  value: DO_API_SPACE_KEY
                - name: AWS_SECRET_ACCESS_KEY
                  value: DO_API_SECRET_KEY
                - name: AWS_DEFAULT_REGION
                  value: sgp1
                - name: AWS_ENDPOINT_URL
                  value: https://sgp1.digitaloceanspaces.com
                - name: PROJECT_NAME
                  value: <backup-name>
                - name: BUCKET_PATH
                  value: s3://do-space/
              volumeMounts:
              - mountPath: /mnt/storage
                name: vol-storage
          volumes:
          - name: vol-storage
            persistentVolumeClaim:
              claimName: pvc-storage

  • Backup to AWS S3
---
apiVersion: batch/v1
kind: CronJob
metadata:
  name: backup-storage
spec:
  schedule: "30 23 * * *"
  jobTemplate:
    spec:
      template:
        spec:
          restartPolicy: Never
          containers:
            - name: backup-storage
              image: wehostasia/storage-backup:aws-s3
              imagePullPolicy: Always
              env:
                - name: AWS_ACCESS_KEY_ID
                  value: AWS_ACCESS_KEY_ID
                - name: AWS_SECRET_ACCESS_KEY
                  value: AWS_SECRET_ACCESS_KEY
                - name: AWS_DEFAULT_REGION
                  value: ap-southeast-1
                - name: AWS_ENDPOINT_URL
                  value: https://s3.ap-southeast-1.amazonaws.com
                - name: PROJECT_NAME
                  value: <backup-name>
                - name: BUCKET_PATH
                  value: s3://s3-bucket/
              volumeMounts:
              - mountPath: /mnt/storage
                name: vol-storage
          volumes:
          - name: vol-storage
            persistentVolumeClaim:
              claimName: pvc-storage

License

View license information⁠ for the software contained in this image.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, Python, AWS CLI, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Tag summary

Content type

Image

Digest

sha256:8f46f6dfc

Size

65.1 MB

Last updated

almost 2 years ago

docker pull wehostasia/storage-backup:3.20