I want to dump a tables backup on another server and I am using ssh for doing it.
when I run the below command, it gives an error but dump file is copied to destination.
mysqldump -u username -ppassword dbname tablename | ssh -t -t servers_username@domain_name 'cat > /tmp/bckp.sql';
tcgetattr: Invalid argument
If I press CTRL+c then it appends error message with Killed by signal 2.
Why is this error?
I’ve seen this error when forcing pseudo-terminal allocation using
ssh -t -torssh -tt.The
tcgetattrfunction is used to look up the attributes of the pseudoterminal represented by a file descriptor; it takes a file descriptor and a pointer to a termios structure to store the terminal metadata in. It looks to me from the stub code in glibc that this error represents a null pointer for thetermiosstruct. I am not sure whether these same error handling semantics are in place for the platform-specific implementations oftcgetattr.If you want to suppress this error, invoke
sshlike so:This will redirect STDERR to
/dev/null; you won’t see the error when invoking with this redirection. Note that this will mask other errors withssh; you may need to remove this for debugging purposes.