# Appdynamics mysql backup error

**URL:** <https://forums.percona.com/t/appdynamics-mysql-backup-error/26349>\
**Category:** Percona XtraBackup\
**Created:** [November 3, 2023, 7:26pm UTC](https://forums.percona.com/t/appdynamics-mysql-backup-error/26349 "2023-11-03T19:26:30Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![MSP](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@MSP](https://forums.percona.com/u/MSP)\
**Post date:** [November 3, 2023, 7:26pm UTC](https://forums.percona.com/t/appdynamics-mysql-backup-error/26349/1 "2023-11-03T19:26:30Z")

</div>

I’m trying to do a full backup on AppDynamics contoller mysql db and I get the below error

# xtrabackup --user=mysqluser --password=mysqlpwd --backup --datadir=\<Controller\_dir\>/db/data/mysql --socket=./mysql.sock

xtrabackup: recognized server arguments: --datadir=/var/lib/mysql --datadir=\<Controller\_dir\>/db/data/mysql  
xtrabackup: recognized client arguments: --user=mysqluser --password=\* --backup=1 --socket=./mysql.sock  
231103 14:45:25 version\_check Connecting to MySQL server with DSN ‘dbi:mysql:;mysql\_read\_default\_group=xtrabackup;mysql\_socket=./mysql.sock’ as ‘mysqluser’ (using password: YES).  
231103 14:45:25 version\_check Connected to MySQL server  
231103 14:45:25 version\_check Executing a version check against the server…  
231103 14:45:28 version\_check Done.  
231103 14:45:28 Connecting to MySQL server host: localhost, user: mysqluser, password: set, port: not set, socket: ./mysql.sock  
Using server version 5.7.39-enterprise-commercial-advanced-log  
Warning: option ‘datadir’ has different values:  
‘\<Controller\_dir\>/db/data/mysql’ in defaults file  
‘\<Controller\_dir\>/db/data/’ in SHOW VARIABLES  
xtrabackup version 2.4.28 based on MySQL server 5.7.40 Linux (x86\_64) (revision id: 44a8f7b)  
xtrabackup: uses posix\_fadvise().  
xtrabackup: cd to /opt/appdyn/controller/db/data/mysql  
xtrabackup: open files limit requested 0, set to 1024  
xtrabackup: using the following InnoDB configuration:  
xtrabackup: innodb\_data\_home\_dir = .  
xtrabackup: innodb\_data\_file\_path = ibdata1:12M:autoextend  
xtrabackup: innodb\_log\_group\_home\_dir = ./  
xtrabackup: innodb\_log\_files\_in\_group = 2  
xtrabackup: innodb\_log\_file\_size = 67108864  
InnoDB: Number of pools: 1  
InnoDB: Operating system error number 2 in a file operation.  
InnoDB: The error means the system cannot find the path specified.  
InnoDB: File ./ib\_logfile0: ‘open’ returned OS error 71. Cannot continue operation  
InnoDB: Cannot continue operation.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [November 3, 2023, 8:58pm UTC](https://forums.percona.com/t/appdynamics-mysql-backup-error/26349/2 "2023-11-03T20:58:39Z")

</div>

Make sure you are running PXB as either root OS user, or a user that can read the MySQL data files. Also, check that SELinux/AppArmour have not re-enabled if previously disabled.

---

<div class="post-metadata">

**Author:** ![MSP](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@MSP](https://forums.percona.com/u/MSP)\
**Post date:** [November 3, 2023, 10:21pm UTC](https://forums.percona.com/t/appdynamics-mysql-backup-error/26349/3 "2023-11-03T22:21:11Z")

</div>

I’m running the pxb as root…!!

But I see the SELinux is enabled. can you share some documentation on why this needs to be disabled while we run this backup

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [November 4, 2023, 12:37pm UTC](https://forums.percona.com/t/appdynamics-mysql-backup-error/26349/4 "2023-11-04T12:37:44Z")

</div>

SELinux is preventing access to the MySQL data files from any other program. You can set SELinux into permissive mode (does not block, but still logs activity). There are many HOWTOs on the web for creating/modifying SELinux rules. You’ll need to do this to allow PXB to run with SELinux enabled.

---

<div class="post-metadata">

**Author:** ![MSP](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@MSP](https://forums.percona.com/u/MSP)\
**Post date:** [November 9, 2023, 1:12pm UTC](https://forums.percona.com/t/appdynamics-mysql-backup-error/26349/5 "2023-11-09T13:12:59Z")

</div>

can you point me to documentation or suggest the SELinux rules to allow Percona to read mysql

Also, While search more on the backup commands I see few posts using the ‘innobackupex’ command, is it for older versions of Xtrabackup?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [November 9, 2023, 2:52pm UTC](https://forums.percona.com/t/appdynamics-mysql-backup-error/26349/6 "2023-11-09T14:52:04Z")

</div>

> [@MSP](#):
>
> I see few posts using the ‘innobackupex’ command, is it for older versions of Xtrabackup?

Yes. innobackupex is extremely old software.

---

<div class="post-metadata">

**Author:** ![MSP](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@MSP](https://forums.percona.com/u/MSP)\
**Post date:** [November 9, 2023, 5:33pm UTC](https://forums.percona.com/t/appdynamics-mysql-backup-error/26349/7 "2023-11-09T17:33:39Z")

</div>

I still get the same error:

# xtrabackup --defaults-file=/opt/appdata/platform/controller/db/db.cnf --user=userid --password=pwd --backup --datadir=/opt/appdata/platform/controller/db/data/mysql --socket=./mysql.sock

xtrabackup: recognized server arguments: --datadir=/opt/appdata/platform/controller/db/data --tmpdir=/opt/appdata/platform/controller/db/data --innodb\_open\_files=300 --open\_files\_limit=40960 --innodb\_flush\_log\_at\_trx\_commit=0 --innodb\_io\_capacity=200 --innodb\_read\_io\_threads=8 --innodb\_write\_io\_threads=8 --innodb\_buffer\_pool\_size=64M --innodb\_log\_file\_size=64M --innodb\_log\_buffer\_size=2M --innodb\_file\_per\_table=1 --datadir=/opt/appdata/platform/controller/db/data/mysql  
xtrabackup: recognized client arguments: --user=root --password=\* --backup=1 --socket=./mysql.sock  
Can’t locate English.pm in @INC (you may need to install the English module) (@INC contains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor\_perl /usr/share/perl5/vendor\_perl /usr/lib64/perl5 /usr/share/perl5) at - line 3.  
BEGIN failed–compilation aborted at - line 3.  
231109 12:27:50 Connecting to MySQL server host: localhost, user: root, password: set, port: not set, socket: ./mysql.sock  
Using server version 5.7.41-enterprise-commercial-advanced-log  
Warning: option ‘datadir’ has different values:  
‘/opt/appdata/platform/controller/db/data/mysql’ in defaults file  
‘/opt/appdata/platform/controller/db/data/’ in SHOW VARIABLES  
xtrabackup version 2.4.28 based on MySQL server 5.7.40 Linux (x86\_64) (revision id: 44a8f7b)  
xtrabackup: uses posix\_fadvise().  
xtrabackup: cd to /opt/appdata/platform/controller/db/data/mysql  
xtrabackup: open files limit requested 40960, set to 40960  
xtrabackup: using the following InnoDB configuration:  
xtrabackup: innodb\_data\_home\_dir = .  
xtrabackup: innodb\_data\_file\_path = ibdata1:12M:autoextend  
xtrabackup: innodb\_log\_group\_home\_dir = ./  
xtrabackup: innodb\_log\_files\_in\_group = 2  
xtrabackup: innodb\_log\_file\_size = 67108864  
InnoDB: Number of pools: 1  
InnoDB: Operating system error number 2 in a file operation.  
InnoDB: The error means the system cannot find the path specified.  
InnoDB: File ./ib\_logfile0: ‘open’ returned OS error 71. Cannot continue operation  
InnoDB: Cannot continue operation.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [November 10, 2023, 3:33pm UTC](https://forums.percona.com/t/appdynamics-mysql-backup-error/26349/8 "2023-11-10T15:33:30Z")

</div>

OS Error 2 is “No such file or directory”  
OS Error 71 is actually a mistype. [https://bugs.mysql.com/bug.php?id=85016](https://bugs.mysql.com/bug.php?id=85016) and 71 also means “File not found.”

You need to look at SELinux audit logs and see if it is actively denying the open command.

> [@MSP](#):
>
> Warning: option ‘datadir’ has different values:  
> ‘/opt/appdata/platform/controller/db/data/mysql’ in defaults file  
> ‘/opt/appdata/platform/controller/db/data/’ in SHOW VARIABLES

I would also fix that issue as well.

Set SELinux in permissive mode and then run PXB. If it works, then you know SELinux is the problem.

---

<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:** [November 13, 2023, 11:21am UTC](https://forums.percona.com/t/appdynamics-mysql-backup-error/26349/9 "2023-11-13T11:21:32Z")

</div>

> [@MSP](#):
>
> Warning: option ‘datadir’ has different values:  
> Warning: option ‘datadir’ has different values:  
> ‘/opt/appdata/platform/controller/db/data/mysql’ in defaults file  
> ‘/opt/appdata/platform/controller/db/data/’ in SHOW VARIABLES

This is also something to check. Looks like you are using ` --datadir=/opt/appdata/platform/controller/db/data/mysql` in the parameter to xtrabackup, but your server datadir is one directory below as displayed in the SHOW VARIABLES warning.

Can you please try to backup using ` --datadir=/opt/appdata/platform/controller/db/data` ?

---

<div class="post-metadata">

**Author:** ![MSP](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@MSP](https://forums.percona.com/u/MSP)\
**Post date:** [November 14, 2023, 12:33am UTC](https://forums.percona.com/t/appdynamics-mysql-backup-error/26349/10 "2023-11-14T00:33:20Z")

</div>

I managed to create the backup using --backup & --compress option. A directory ‘xtrabackup\_backupfiles’ is now created with compressed files.

As the next step I tried to do a --prepare from the db directory (where the --backup command was run) and get the below error.

xtrabackup --prepare  
xtrabackup: recognized server arguments:  
xtrabackup: recognized client arguments: --prepare=1  
xtrabackup version 2.4.28 based on MySQL server 5.7.40 Linux (x86\_64) (revision id: 44a8f7b)  
xtrabackup: cd to /opt/appdata/platform/controller/db/xtrabackup\_backupfiles/  
xtrabackup: This target seems to be not prepared yet.  
InnoDB: Number of pools: 1  
InnoDB: Operating system error number 2 in a file operation.  
InnoDB: The error means the system cannot find the path specified.  
xtrabackup: Warning: cannot open ./xtrabackup\_logfile. will try to find.  
InnoDB: Operating system error number 2 in a file operation.  
InnoDB: The error means the system cannot find the path specified.  
xtrabackup: Fatal error: cannot find ./xtrabackup\_logfile.  
xtrabackup: Error: xtrabackup\_init\_temp\_log() failed.

I do see the file ‘xtrabackup\_logfile.qp’ in the ‘xtrabackup\_backupfiles’ directory

I did try doing a decompress before running prepare but I get the below error though qpress is already installed.

xtrabackup --decompress  
xtrabackup: recognized server arguments:  
xtrabackup: recognized client arguments: --decompress=1  
xtrabackup version 2.4.28 based on MySQL server 5.7.40 Linux (x86\_64) (revision id: 44a8f7b)  
231113 19:31:49 [01] decompressing ./sys/x@0024schema\_table\_statistics.frm.qp  
sh: qpress: command not found  
cat: write error: Broken pipe  
Error: decrypt and decompress thread 0 failed.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [November 14, 2023, 5:36am UTC](https://forums.percona.com/t/appdynamics-mysql-backup-error/26349/11 "2023-11-14T05:36:48Z")

</div>

> [@MSP](#):
>
> I did try doing a decompress before running prepare but I get the below error though qpress is already installed

Yes, you must decompress before you can compare. How did you verify qpress is installed? Use `which qpress` to verify.

---

<div class="post-metadata">

**Author:** ![MSP](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@MSP](https://forums.percona.com/u/MSP)\
**Post date:** [November 14, 2023, 4:39pm UTC](https://forums.percona.com/t/appdynamics-mysql-backup-error/26349/12 "2023-11-14T16:39:00Z")

</div>

Looks like we dont have qpress installed…!!  
Why is not listed in the dependencies if percona is using qpress for compression?

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [November 14, 2023, 11:14pm UTC](https://forums.percona.com/t/appdynamics-mysql-backup-error/26349/13 "2023-11-14T23:14:26Z")

</div>

That is an excellent question! 🙂  
Here’s the JIRA I opened on that very issue over 3 years ago.  
[https://jira.percona.com/browse/PXB-2134](https://jira.percona.com/browse/PXB-2134)  
But now, in PXB8, qpress is no longer used and zstd is the default. Once you get to MySQL 8, you shouldn’t have any issues.

---

<div class="post-metadata">

**Author:** ![MSP](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@MSP](https://forums.percona.com/u/MSP)\
**Post date:** [January 16, 2024, 4:45pm UTC](https://forums.percona.com/t/appdynamics-mysql-backup-error/26349/14 "2024-01-16T16:45:45Z")

</div>

Where can we download the latest version of qpress? we have 11.1 and it is flagged in our vulnerability scan.

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [January 16, 2024, 9:06pm UTC](https://forums.percona.com/t/appdynamics-mysql-backup-error/26349/15 "2024-01-16T21:06:44Z")

</div>

```auto
$ qpress -v
qpress 1.1 - Copyright 2006-2010 Lasse Reinhold - www.quicklz.com
Using QuickLZ 1.4.1 compression library

```

[https://repo.percona.com/tools/yum/release/9/RPMS/x86\_64/qpress-11-3.el9.x86\_64.rpm](https://repo.percona.com/tools/yum/release/9/RPMS/x86_64/qpress-11-3.el9.x86_64.rpm)  
[https://repo.percona.com/tools/apt/pool/main/q/qpress/](https://repo.percona.com/tools/apt/pool/main/q/qpress/)

---

<div class="post-metadata">

**Author:** ![MSP](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@MSP](https://forums.percona.com/u/MSP)\
**Post date:** [January 19, 2024, 6:29pm UTC](https://forums.percona.com/t/appdynamics-mysql-backup-error/26349/16 "2024-01-19T18:29:59Z")

</div>

is there a quick way to findout which version of qpress is installed? if I do a qpress -v, both the versions show they are qpress 1.1 using QuickLZ 1.4.1

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [January 19, 2024, 8:01pm UTC](https://forums.percona.com/t/appdynamics-mysql-backup-error/26349/17 "2024-01-19T20:01:14Z")

</div>

> [@MSP](#):
>
> show they are qpress 1.1 using QuickLZ 1.4.1

Looks like you are on the latest version. When you upgrade to Xtrabackup 8, qpress was removed and replaced with ZSTD
