I'm trying to issue a remote mysqldump command, redirect stdout to a dmp file, then tar that up.
I'm a bit confused as to how to do the redirection bits over ssh:
i.e.
ssh
[email protected] mysqldump $dbname -u admin -p > dbdump.dmp && tar cvzf dbdump.tar.gz dbdump.dmp
Issues:
1) I'm not providing the password because I want it to prompt me. Will an ssh remote command deal with this?
2) What's the deal with the syntax? Do I want to use quotations, or don't I? What happens with the redirects and pipes? Do those have to be escaped or formatted in some special fashion.