Chnages in backup script. Custom backup image?

I need to make changes in the backup script run_backup.sh
The pattern for backup file names must be changed. The colon symbol is in use by default : and it is not tolerated by my S3 storage (Hitachy HCP)

I created a custom image from this code percona-docker/percona-xtradb-cluster-8.0-backup at main · percona/percona-docker · GitHub
Uploaded it to my image repo and re4ferebnced it value.yaml:

backup:
  enabled: true
  image: "chudinov/percona-xtradb-cluster-8.0-backup:latest"
  imagePullSecrets: []  
  pitr:
    enabled: false    
  storages:
    s3-storage:
      type: s3
      s3:
        bucket: dummy
        credentialsAccessKey: dummy
        credentialsSecretKey: dummy
        region: default
        endpointUrl: dummy
  schedule:
    - name: "daily-s3"
      schedule: "* * * * *"
      keep: 5
      storageName: s3-storage

But it does not seem that changes take effect. It looks like the old backup script is still in use.

How to make changes in the backup script?

2 Likes

hi @Michael_Chudinov ,

You need to disable version service (set apply: Never).

After that your custom image will be used.

1 Like

Do you mean like this?
updateStrategy: Never

1 Like

Yes it works now!
However the backup script in the custom image can not conenct to Xtradb cluster database:
Script complains about certificate.
I do not use any custom certificates. The Xtradb cluster is installed out of Helm chart, certificates should be selfsigned generated. How to fix it?

2021-11-12 11:33:07.713  INFO: protonet asio version 0
2021-11-12 11:33:07.714  INFO: Using CRC-32C for message checksums.
2021-11-12 11:33:07.714  INFO: initializing ssl context
2021-11-12 11:33:07.714  INFO: backend: asio
2021-11-12 11:33:07.714  INFO: gcomm thread scheduling priority set to other:0 
2021-11-12 11:33:07.714  WARN: Fail to access the file (./gvwstate.dat) error (No such file or directory). It is possible if node is booting for first time or re-booting after a graceful shutdown
2021-11-12 11:33:07.714  INFO: Restoring primary-component from disk failed. Either node is booting for first time or re-booting after a graceful shutdown
2021-11-12 11:33:07.714  INFO: GMCast version 0
2021-11-12 11:33:07.715  INFO: (4ecd1e62-90bd, 'ssl://0.0.0.0:4567') listening at ssl://0.0.0.0:4567
2021-11-12 11:33:07.715  INFO: (4ecd1e62-90bd, 'ssl://0.0.0.0:4567') multicast: , ttl: 1
2021-11-12 11:33:07.715  INFO: EVS version 1
2021-11-12 11:33:07.715  INFO: gcomm: connecting to group 'xtradb-pxc-db-pxc', peer 'xtradb-pxc-db-pxc-2.xtradb-pxc-db-pxc:'
2021-11-12 11:33:07.718 ERROR: handshake with remote endpoint ssl://10.200.89.29:4567 failed: asio.ssl:337047686: 'certificate verify failed' ( 337047686: 'error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed')
This error is often caused by SSL issues. For more information, please see:
  https://per.co.na/pxc/encrypt_cluster_traffic
2 Likes