Xtrabackup: Error: unknown argument: './'

In the doc of <>
On the destination host:
$ nc -l 9999 | cat - > /data/backups/backup.xbstream
On the source host:
$ xtrabackup --backup --stream=xbstream ./ | nc desthost 9999

but

$xtrabackup --defaults-file=/data/mysql_3307/my_3307.cnf --backup --slave-info --binlog-info=ON --tmpdir=/rundata/tmp/ --host=127.0.0.1 --port=3307 -u'superuser' -p'supersecurt' --stream=xbstream ./| nc 192.168.4.224 64036 
xtrabackup: recognized server arguments: --server-id=0040363307 --datadir=/data/mysql_3307/data --open_files_limit=65535 --innodb_buffer_pool_size=10G --innodb_io_capacity=2000 --innodb_flush_method=O_DIRECT --innodb_undo_tablespaces=3 --innodb_log_file_size=1G --innodb_log_files_in_group=5 --innodb_log_buffer_size=32M --innodb_write_io_threads=8 --innodb_read_io_threads=8 --innodb_file_per_table=1 --innodb_open_files=65535 --innodb_data_file_path=ibdata1:1G:autoextend --innodb_flush_log_at_trx_commit=1 --innodb_checksums=1 --innodb_checksum_algorithm=crc32 --log_bin=/data/mysql_3307/logs/0040363307-mysql-bin --tmpdir=/rundata/tmp/ 
xtrabackup: recognized client arguments: --server-id=0040363307 --datadir=/data/mysql_3307/data --open_files_limit=65535 --innodb_buffer_pool_size=10G --innodb_io_capacity=2000 --innodb_flush_method=O_DIRECT --innodb_undo_tablespaces=3 --innodb_log_file_size=1G --innodb_log_files_in_group=5 --innodb_log_buffer_size=32M --innodb_write_io_threads=8 --innodb_read_io_threads=8 --innodb_file_per_table=1 --innodb_open_files=65535 --innodb_data_file_path=ibdata1:1G:autoextend --innodb_flush_log_at_trx_commit=1 --innodb_checksums=1 --innodb_checksum_algorithm=crc32 --log_bin=/data/mysql_3307/logs/0040363307-mysql-bin --tmpdir=/rundata/tmp/ --backup=1 --slave-info=1 --binlog-info=ON --host=127.0.0.1 --port=3307 --user=an_master --password=* --stream=xbstream 
xtrabackup: Error: unknown argument: './'

xtrabackup: Error: unknown argument: ‘./’

is this should be --target-dir=./ ? is this a doc error?

This seems to be a doc error. You should use --target-dir /path/to/mysql to be explicit and avoid any issues.

1 Like