$innobackupex --user=admin --password="xxxxxx" --socket=/u01/mysql/run/mysql.sock /data/backup/ xtrabackup: recognized server arguments: --datadir=/var/lib/mysql xtrabackup: recognized client arguments: 211206 10:40:54 innobackupex: Starting the backup operation IMPORTANT: Please check that the backup run completes successfully. At the end of a successful backup run innobackupex prints "completed OK!". 211206 10:40:54 version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;mysql_socket=/u01/mysql/run/mysql.sock' as 'admin' (using password: YES). 211206 10:40:54 version_check Connected to MySQL server 211206 10:40:54 version_check Executing a version check against the server... 211206 10:40:54 version_check Done. 211206 10:40:54 Connecting to MySQL server host: localhost, user: admin, password: set, port: not set, socket: /u01/mysql/run/mysql.sock Using server version 5.7.25-log Warning: option 'datadir' points to nonexistent directory '/var/lib/mysql' Warning: option 'datadir' has different values: '/var/lib/mysql' in defaults file '/u01/mysql/data/' in SHOW VARIABLES innobackupex version 2.4.15 based on MySQL server 5.7.19 Linux (x86_64) (revision id: 544842a) xtrabackup: uses posix_fadvise(). innobackupex: Can't change dir to '/var/lib/mysql' (Errcode: 2 - No such file or directory) xtrabackup: cannot my_setwd /var/lib/mysql
Solution:
MySQL instance for custom installation, modify mv /etc/my.cnf /etc/my.cnf.bk