# Differences in the bitnami xtrabackup docker image?

**URL:** <https://forums.percona.com/t/differences-in-the-bitnami-xtrabackup-docker-image/22441>\
**Category:** Percona XtraBackup\
**Created:** [May 31, 2023, 1:15pm UTC](https://forums.percona.com/t/differences-in-the-bitnami-xtrabackup-docker-image/22441 "2023-05-31T13:15:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_Neumann](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/martin_neumann/32/9076_2.png) [@Martin\_Neumann](https://forums.percona.com/u/Martin_Neumann)\
**Post date:** [May 31, 2023, 1:15pm UTC](https://forums.percona.com/t/differences-in-the-bitnami-xtrabackup-docker-image/22441/1 "2023-05-31T13:15:15Z")

</div>

I am running the following command within my bash file:  
sudo docker run --rm -it -v /var/lib/docker/volumes/mysql\_data/\_data:/var/lib/mysql -v $BACKUP\_DIR:/xtrabackup\_backupfiles percona/percona-xtrabackup:8.0.32-26 xtrabackup --backup --no-defaults --compress=lz4 --host=mysql --user=root --password=secret --target-dir=“/xtrabackup\_backupfiles/$MONTHLY\_BACKUP”

It works perfect this way. But if I change to the bitnami image, it gives me the following output:  
2023-05-31T12:45:52.413847-00:00 0 [Note] [MY-011825] [Xtrabackup] recognized client arguments: --backup=1 --host=mysql --user=root --password=\* --target-dir=/xtrabackup\_backupfiles/monthly\_2023-05  
2023-05-31T12:45:52.414013-00:00 0 [ERROR] [MY-011825] [Xtrabackup] unknown argument: ‘xtrabackup’

Is there any difference on how to handle the parameters in the bitnami image? or is that a bug?

---

<div class="post-metadata">

**Author:** ![Marcelo\_Altmann](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marcelo_altmann/32/11299_2.png) [@Marcelo\_Altmann](https://forums.percona.com/u/Marcelo_Altmann)\
**Post date:** [May 31, 2023, 1:48pm UTC](https://forums.percona.com/t/differences-in-the-bitnami-xtrabackup-docker-image/22441/2 "2023-05-31T13:48:19Z")

</div>

Hi Martin.

The way to use both image is different.

Percona Image - you need to pass the binary name + arguments:

```auto
$ docker run --rm --name percona-xtrabackup percona/percona-xtrabackup:8.0.32-26 xtrabackup --version
xtrabackup version 8.0.32-26 based on MySQL server 8.0.32 Linux (x86_64) (revision id: 34cf2908)

```

Bitnami Image - it interprets everything after the image name as parameter to xtrabackup:

```auto
$ docker run --rm --name percona-xtrabackup bitnami/percona-xtrabackup:latest --version
xtrabackup version 8.0.33-27 based on MySQL server 8.0.33 Linux (x86_64) (revision id: 6743d8c7)

```

So on your case you should do:

```auto
sudo docker run --rm -it -v /var/lib/docker/volumes/mysql_data/_data:/var/lib/mysql -v $BACKUP_DIR:/xtrabackup_backupfiles bitnami/percona-xtrabackup:latest --backup --no-defaults --compress=lz4 --host=mysql --user=root --password=secret --target-dir=“/xtrabackup_backupfiles/$MONTHLY_BACKUP”

```

---

<div class="post-metadata">

**Author:** ![Martin\_Neumann](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/martin_neumann/32/9076_2.png) [@Martin\_Neumann](https://forums.percona.com/u/Martin_Neumann)\
**Post date:** [May 31, 2023, 2:23pm UTC](https://forums.percona.com/t/differences-in-the-bitnami-xtrabackup-docker-image/22441/3 "2023-05-31T14:23:02Z")

</div>

Thanks for the clarification. Funny that with the --version parameter it runs either way. For the backup parameter you really need to take out the xtrabackup command like you said. And they do not clarify that on their docker image documentation.

Now after correcting that I get the following output:  
2023-05-31T14:15:41.996331-00:00 0 [Note] [MY-011825] [Xtrabackup] recognized client arguments: --backup=1 --compress=lz4 --host=localhost --user=root --password=\* --incremental-basedir=/xtrabackup\_backupfiles/monthly\_2023-05 --target-dir=/xtrabackup\_backupfiles/daily\_2023-05-31  
xtrabackup version 8.0.32-26 based on MySQL server 8.0.32 Linux (x86\_64) (revision id: 34cf2908)  
Can’t locate English.pm in @INC (you may need to install the English module) (@INC contains: /etc/perl /usr/local/lib/x86\_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/x86\_64-linux-gnu/perl5/5.32 /usr/share/perl5 /usr/lib/x86\_64-linux-gnu/perl-base /usr/lib/x86\_64-linux-gnu/perl/5.32 /usr/share/perl/5.32 /usr/local/lib/site\_perl) at - line 3.  
BEGIN failed–compilation aborted at - line 3.  
2023-05-31T14:15:42.008561-00:00 0 [Note] [MY-011825] [Xtrabackup] Connecting to MySQL server host: localhost, user: root, password: set, port: not set, socket: not set  
2023-05-31T14:15:42.008861-00:00 0 [ERROR] [MY-011825] [Xtrabackup] Failed to connect to MySQL server: Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)

Same command with the percona image is working fine.

---

<div class="post-metadata">

**Author:** ![Marcelo\_Altmann](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marcelo_altmann/32/11299_2.png) [@Marcelo\_Altmann](https://forums.percona.com/u/Marcelo_Altmann)\
**Post date:** [May 31, 2023, 2:47pm UTC](https://forums.percona.com/t/differences-in-the-bitnami-xtrabackup-docker-image/22441/4 "2023-05-31T14:47:30Z")

</div>

there is two issues there

1 . Missing perl package on image - you can set `--no-version-check` to avoid the perl version check script to run  
2. Connection issue. Image is trying to connect to /tmp/mysql.sock which does not exist. Try connecting over port (you will need correct port mapping) or adjust the socket xtrabackup is trying to connect (you also need to make sure the docker instance has access to the socket file).

---

<div class="post-metadata">

**Author:** ![Martin\_Neumann](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/martin_neumann/32/9076_2.png) [@Martin\_Neumann](https://forums.percona.com/u/Martin_Neumann)\
**Post date:** [May 31, 2023, 4:18pm UTC](https://forums.percona.com/t/differences-in-the-bitnami-xtrabackup-docker-image/22441/5 "2023-05-31T16:18:55Z")

</div>

Thanks for your feedback. I could get rid of the perl error message. Defining the port parameter did not resolve the issue. On the socket file, is that the one in the MySQL data directory? Seems that bitnami xtrabackup searches for it in the tmp directory, while the path is /var/lib/mysql . Do I need to define that path in the socket parameter?

---

<div class="post-metadata">

**Author:** ![Marcelo\_Altmann](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/marcelo_altmann/32/11299_2.png) [@Marcelo\_Altmann](https://forums.percona.com/u/Marcelo_Altmann)\
**Post date:** [May 31, 2023, 5:04pm UTC](https://forums.percona.com/t/differences-in-the-bitnami-xtrabackup-docker-image/22441/6 "2023-05-31T17:04:43Z")

</div>

xtrabackup will read the default from my.cnf, looks like bitnami points to /tmp. Adjust xtrabackup parameter to us `--soket=/var/lib/mysql/mysql.sock`. Please check by the correct socket by running `SELECT @@socket;` on the server you wish to backup.

---

<div class="post-metadata">

**Author:** ![Martin\_Neumann](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/martin_neumann/32/9076_2.png) [@Martin\_Neumann](https://forums.percona.com/u/Martin_Neumann)\
**Post date:** [May 31, 2023, 6:40pm UTC](https://forums.percona.com/t/differences-in-the-bitnami-xtrabackup-docker-image/22441/7 "2023-05-31T18:40:04Z")

</div>

Thanks, that was working. I am trying now to get the same thing to work on an ARM64 VPS running Oracle Linux. I am getting the error:  
2023-05-31T18:23:11.845472-00:00 0 [ERROR] [MY-011825] [Xtrabackup] cannot mkdir: 13 /xtrabackup\_backupfiles/monthly\_2023-05/

I already did rwxrwxrwx privilleges on the backup folder and I do not get it to work. What could be the issue causing that problem?

---

<div class="post-metadata">

**Author:** ![Martin\_Neumann](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/martin_neumann/32/9076_2.png) [@Martin\_Neumann](https://forums.percona.com/u/Martin_Neumann)\
**Post date:** [May 31, 2023, 6:48pm UTC](https://forums.percona.com/t/differences-in-the-bitnami-xtrabackup-docker-image/22441/8 "2023-05-31T18:48:41Z")

</div>

Just figured it out. The absolute path to the backup dir was not right, and so it ended up writing somewhere else. Thanks, got that working nicely now!
