api_version: iobackup.io/v1
kind: BackupJob
metadata:
  job_id: mysql-local
  name: MySQL local streaming backup
spec:
  enabled: true
  operation:
    type: backup
  artifact:
    mode: stream
    staging:
      enabled: false
  tasks:
    - task_id: mysql-main
      source:
        type: mysql
        config:
          host: 127.0.0.1
          port: 3307
          username: iobackup
          password_env: MYSQL_BACKUP_PASSWORD
          databases:
            - iobackup_test
          dump:
            tool: mysqldump
            single_transaction: true
            routines: true
            triggers: true
            events: true
            master_data: false
      destination:
        type: local
        config:
          path: /add/tmp/backups
