Backup with Hitachi Content Platform (HCP) S3 storage problem

XtraDB backup uses colon in backup file names.
We use Hitachi Content Platform (HCP) as S3-compatible storage for XtraDB backup.

HCP encodes colon : in filenames to percent-encoded characters.
For example file xtradb-pxc-db-2021-11-10-21:20:00-full.md5 becomes xtradb-pxc-db-2021-11-10-21%3A50%3A00-full.md5.

Then mc stat command fails on files with colon in names:

$mcc ls hcp/phpipam-platform-backup/cfcr2/
[2021-11-10 23:05:19 CET]  31KiB xtradb-pxc-db-2021-11-10-22%3A50%3A00-full.md5

mc stat hcp/phpipam-platform-backup/cfcr2/xtradb-pxc-db-2021-11-10-22:00:00-full.md5
mc: <ERROR> Unable to stat `hcp/phpipam-platform-backup/cfcr2/xtradb-pxc-db-2021-11-10-22:00:00-full.md5`. Target `hcp/phpipam-platform-backup/cfcr2/xtradb-pxc-db-2021-11-10-22:00:00-full.md5` not found.

XtraDB backup script checks the state of MD5 file uploaded to S3 using mc stat command. Since this command fails, script never complete, even files are uploaded to backup storage.

Is there any way to avoid using colon in the filename? and use an other separator inside file name?

1 Like

Hello @Michael_Chudinov,
I’m pretty sure that xtrabackup does not produce any files on its own. If you have a wrapper script, that script can be modified to create whatever file you want. If you are using innobackupex, you should switch to pure xtrabackup (since innobackupex is just a wrapper itself around xtrabackup) and then you have complete control over the filenames. Or, check the help of innobackupex for how to change the file name.

1 Like

I use something that comes from this repository

this is a part of XtraDB operator.
A docker container from this code percona-docker/percona-xtradb-cluster-8.0-backup at main · percona/percona-docker · GitHub
is created by XtraDB operator and does the backup using values.yaml file used for Helm while cluster installation.
No wrapper script is needed.

Helm installation:

helm install xtradb percona/pxc-db --namespace xtradb \
--set cluster.enabled=true \
--values values.yaml  


  enabled: true
  image: ""
  imagePullSecrets: []  
    enabled: false    
      type: s3
        bucket: dummy
        # credentialsSecret: s3-xtradb-backup-credentials
        credentialsAccessKey: dummy
        credentialsSecretKey: dummy
        region: default
        endpointUrl: dummy
    - name: "daily-s3"
      schedule: "*/10 * * * *"
      keep: 5
      storageName: s3-storage
1 Like