api_version: iobackup.io/v1
kind: BackupJob
metadata:
  job_id: mysql-s3-streaming
  name: MySQL to S3 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: s3
        config:
          endpoint: https://s3.twcstorage.ru
          region: ru-1
          bucket: iobackup
          prefix: iobackup-tests/mysql
          access_key_env: S3_ACCESS_KEY
          secret_key_env: S3_SECRET_KEY
          force_path_style: true
          storage_class: STANDARD
          multipart:
            enabled: true
            part_size: 67108864
            concurrency: 4
