We have a cron job to backup all mysql containers inside docker (v18.09.4, build d14af54266), that use a default Xtrabackup container (dockerhub) to mount volumes from MySQL target container and link (net) to do the backup.
Until version 8.0.31, all is fine, but now when mount the volumes inside xtrabackup containers, all permissions are lost and is not possible to use then.
The error message is:
ls: cannot access ‘/backup’: Operation not permitted
The /backup is a bind for a host nfs4 mounted volume, that as the same options for Xtrabackup 8.0.29 and 2.4 that has successfully running jobs.
Anyone know what is needed to use (or what is different) at versions 8.0.30+ of xtrabacku container?
Adding the option “–privilege” to the “docker run” command, was able to access bind volumes.
But… the UID of the user “mysql” inside Xtrabackup container (UID:1001) differs from the user inside Oracle MySQL container (UID:999) so, “ta-dah!” a new challenge to solve… =(
Without access to root of container, remain without a solution for the acesss UID problem behind 1001 (percona:mysql/xtrabackup) vs 999 (oracle:mysql)…
@Romolo_DBA all Percona dockers add mysql user with UUID=1001
It is done for backward compatibility with our previous images.
Its turn a problem for me, because when instantiated a parallel Xtrabackup container with options do get volume from target MySQL Oracle container, isn’t possible to do the backup. With xbkp container image 8.0.17 this problem doesnt occur. My workaround solution (for a while, until solve the official) was to create a non-official Xtrabackup Image based on OracleLinux8 and RPM packages, so ran as root with success, bypassing the UID/privilege problem.