This docker image provides a way that execute XtraBackup inside a docker container. See Percona XtraBackup official site for more detail about the Percona XtraBackup.
For MySQL v8.0 or later:
docker run --rm \
-v /etc/mysql:/etc/mysql:ro \
-v /var/lib/mysql:/var/lib/mysql:ro \
-v /run:/run:ro \
yuuki0xff/percona-xtrabackup:8 xtrabackup --backup --stream xbstream --uroot
For MySQL 5.x:
docker run --rm \
-v /etc/mysql:/etc/mysql:ro \
-v /var/lib/mysql:/var/lib/mysql:ro \
-v /run:/run:ro \
yuuki0xff/percona-xtrabackup:2 xtrabackup --backup --stream xbstream --uroot
- xbcloud
- xbcloud_osenv
- xbcrypt
- xbstream
- xtrabackup