Percona Xtrabackup 8.0 Error

Hi there,
Facing the errors when executed the xtrabackup command.

[root@Test1 ~]# xtrabackup --user=root   --password=a#$kdr   --backup --datadir=/var/lib/mysql/ --target-dir=/etc/data/mysql/backups
xtrabackup: recognized server arguments: --datadir=/var/lib/mysql --datadir=/var/lib/mysql/
xtrabackup: recognized client arguments: --target-dir=/etc/data/mysql/backups --user=root --password=* --backup=1 --target-dir=/etc/data/mysql/backups
xtrabackup version 8.0.25-17 based on MySQL server 8.0.25 Linux (x86_64) (revision id: d27028b)
210817 23:49:27  version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' as 'root'  (using password: YES).
Failed to connect to MySQL server: DBI connect(';mysql_read_default_group=xtrabackup','root',...) failed: Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory at - line 1535.
210817 23:49:27 Connecting to MySQL server host: localhost, user: root, password: set, port: not set, socket: not set
Using server version 8.0.25-15
210817 23:49:27 Executing LOCK TABLES FOR BACKUP...
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/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 = 50331648
Number of pools: 1
xtrabackup: inititialize_service_handles suceeded
210817 23:49:27 Connecting to MySQL server host: localhost, user: root, password: set, port: not set, socket: not set
xtrabackup: Redo Log Archiving is not set up.
xtrabackup: Can't create/write to file '/etc/data/mysql/backups/xtrabackup_logfile' (OS errno 17 - File exists)
xtrabackup: error: failed to open the target stream for 'xtrabackup_logfile'.
2 Likes

Hi @AneeshBabu

xtrabackup: Can't create/write to file '/etc/data/mysql/backups/xtrabackup_logfile' (OS errno 17 - File exists)

This means you already have a backup at /etc/data/mysql/backups/ . Please specify an empty folder for --target-dir parameter.

1 Like

Hi there,
When executed the below command facing the error .
target directory is already empty.

[root@Test1 ~]#xtrabackup --user=root   --password=a#$kdr   --backup --datadir=/var/lib/mysql/ --target-dir=/etc/data/mysql/backups
xtrabackup: recognized server arguments: --datadir=/var/lib/mysql --datadir=/var/lib/mysql/
xtrabackup: recognized client arguments: --target-dir=/etc/data/mysql/backups --user=root --password=* --backup=1 --target-dir=/etc/data/mysql/backups
xtrabackup version 8.0.25-17 based on MySQL server 8.0.25 Linux (x86_64) (revision id: d27028b)
210818 22:28:37  version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' as 'root'  (using password: YES).
**Failed to connect to MySQL server: DBI connect(';mysql_read_default_group=xtrabackup','root',...) failed: Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so**: cannot open shared object file: No such file or directory at - line 1535.
210818 22:28:37 Connecting to MySQL server host: localhost, user: root, password: set, port: not set, socket: not set
1 Like

@Marcelo_Altmann
What could be the issue…?

1 Like

Hi @AneeshBabu ,

Your version of perl mysql module doesn’t support caching_sha2 authentication method.

Either, update your perl-dbd-mysql to a version that supports it, or change your user authentication algorithm:

ALTER USER 'user'@'host' IDENTIFIED WITH 'mysql_native_password' BY 'my_password';
1 Like