Skip to content

cubit-inc/k8s-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes Cron Job Backup

license

This repository contains Docker images designed for use with Kubernetes CronJobs to automate backups of various services.

MySQL Backup

apiVersion: batch/v1
kind: CronJob
metadata:
  name: mysql-backup-cronjob
spec:
  schedule: "0 */12 * * *" # Runs every 12 hours
  jobTemplate:
    spec:
      template:
        spec:
          restartPolicy: OnFailure
          containers:
            - name: mysql-backup
              image: ghcr.io/cubit-inc/k8s-backup/k8s-backup-mysql:latest
              env:
                - name: DATABASE_HOST
                  value: mydb.example.com
                - name: DATABASE_PASSWORD
                  value: <secret>
                - name: AWS_BUCKET_URI
                  value: https://mybackups.s3.some-region.amazonaws.com
                - name: AWS_BUCKET_BACKUP_PATH
                  value: sql-backups
                - name: AWS_ACCESS_KEY_ID
                  value: <secret>
                - name: AWS_SECRET_ACCESS_KEY
                  value: <secret>

Contributing

We welcome contributions! Feel free to submit issues and pull requests to enhance this project.

License

This project is licensed under the MIT License.


Built with 🤍
@cubit.inc

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages