GitHub Actions for periodically backup your database (MySQL, Postgres, or MongoDB) to S3 or local disk.
MIT License
GitHub Action for periodically backup a your database (MySQL, Postgres or MongoDB) to Local Disk or S3 (AWS S3 or Minio).
- name: backup postgres
uses: ./
with:
database_driver: postgres
database_username: db
database_password: db
database_name: db
database_host: postgres:5432
storage_driver: s3
access_key_id: 1234567890
secret_access_key: 1234567890
storage_endpoint: minio:9000
storage_bucket: test
storage_region: ap-northeast-1
storage_path: backup
- name: backup mysql
uses: ./
with:
database_driver: mysql
database_username: db
database_password: db
database_name: db
database_host: mysql:3306
storage_driver: s3
access_key_id: 1234567890
secret_access_key: 1234567890
storage_endpoint: minio:9000
storage_bucket: test
storage_region: ap-northeast-1
storage_path: backup
- name: backup mongo
uses: ./
with:
database_driver: mongo
database_username: db
database_password: db
database_name: db
database_host: mongo:27017
database_opts: "--authenticationDatabase admin"
storage_driver: s3
access_key_id: 1234567890
secret_access_key: 1234567890
storage_endpoint: minio:9000
storage_bucket: test
storage_region: ap-northeast-1
storage_path: backup
See action.yml for more detailed information.
postgres
, mysql
or mongo
. default is postgres
pg_dump
, mysqldump
or mongodump
commands3
or disk
. default is s3
s3.amazonaws.com
ap-northeast-1
backup
and all dump file will save in bucket/backup
directoryfalse
false