Have you give this a try yet? It should work. Pay attention to the quotation marks. I'll add some parenthesis for clarity:
(ssh user@server "mysqldump ericdev | gzip") | gunzip | mysql ericcart
So, the first command, ssh user@server "mysqldump ericdev | gzip"
, returns a gzipped DB. That gzipped DB is then piped into gunzip
and mysql
commands. The ssh command is only for the remote server.
Edit: I completely missed the point of the question, let me try again. (Thanks, @RiggsFolly)
You are going to want to install cygwin. Cygwin lets you run lots of repackaged linux utilities on Windows, SSH included. Go through the Cygwin setup and choose SSH under the "Net" section (search for it if you need to). After you've installed it, you should be able to open up the Cygwin console and run the ssh
command.
So that you don't have to use the Cygwin console, I highly recommend adding the Cygwin Bin directory to the system path. You may need to reboot after doing that, but you should be able to run your original command right in command prompt or Powershell.