可以用SSH登录远程主机操作,但是备份时好像一直在连接,没有提示要输入密码:
网上说安装sshpass有用吗,我的centos5.6好像找不到源[root@localhost xtrabackup]#innobackupex  --user=backup --password=backup --stream=tar ./|ssh [email protected] "cat - > /stream/backup.tar"
161116 01:10:24 innobackupex: Starting the backup operationIMPORTANT: Please check that the backup run completes successfully.
           At the end of a successful backup run innobackupex
           prints "completed OK!".161116 01:10:25  version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;port=3306;mysql_socket=/var/lib/mysql/mysql.sock' as 'backup'  (using password: YES).
161116 01:10:25  version_check Connected to MySQL server
161116 01:10:25  version_check Executing a version check against the server...
161116 01:10:25  version_check Done.
161116 01:10:25 Connecting to MySQL server host: localhost, user: backup, password: set, port: 3306, socket: /var/lib/mysql/mysql.sock
Using server version 5.6.34
innobackupex version 2.4.4 based on MySQL server 5.7.13 Linux (x86_64) (revision id: df58cf2)
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
InnoDB: Number of pools: 1
161116 01:10:25 >> log scanned up to (1704015)
xtrabackup: Generating a list of tablespaces
InnoDB: Allocated tablespace ID 2 for mysql/innodb_index_stats, old maximum was 0
161116 01:10:25 [01] Streaming ./ibdata1
161116 01:10:26 >> log scanned up to (1704015)
161116 01:10:27 >> log scanned up to (1704015)
161116 01:10:28 >> log scanned up to (1704015)
161116 01:10:29 >> log scanned up to (1704015)
161116 01:10:30 >> log scanned up to (1704015)
161116 01:10:31 >> log scanned up to (1704015)
161116 01:10:32 >> log scanned up to (1704015)
161116 01:10:33 >> log scanned up to (1704015)
161116 01:10:34 >> log scanned up to (1704015)
161116 01:10:35 >> log scanned up to (1704015)