-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Benjamin, et al --

...and then Benjamin Pflugmann said...
% 
% On Mon 2003-01-27 at 21:45:54 -0500, [EMAIL PROTECTED] wrote:
% > 
% > ...and then Stefan Hinz, iConnect (Berlin) said...
% > % 
...
% > % c:\mysql\bin> mysqldump --all-databases --add-drop-table > mysql -h
% > % myoffice -u username -p
% 
% ">" is wrong, of course, because it will try to direct the output into
% a file named "mysql". "|" is what is used to pipe between programs.

Agreed.  I wasn't going to mess with that side detail, though; I figured
that if he were actually doing this he couldn't have that character there,
and if it were just theoretical then it wasn't important anyway :-)


% 
...
% > why not take a moment to compress it before you send it over your tiny
% > drinking straw of a 'net pipeline...
% > 
% >   mysqldump ... | gzip -9 | ssh myoffice gunzip | mysql -u username -p pass
% 
% That wouldn't work, would it? I am quite sure the pipes are all
% interpreted by your local shell, so that would effectively mean to

Oh, you're quite right.  Slap some quotes around it like

  ... "gunzip ... pass"

and we're in much better shape.


% send the data via ssh to the remote machine for unzipping and then
% processing the output that got sent back via a local mysql. ;)

But it's *good* to run the data through that remote gunzip filter.
Besides, think of the MRTG output ;-)


% 
% > Surely you have the cygwin toolkit and ssh for Win, right?
% 
% And you could use build-in compression of ssh. So presuming a working
% ssh on the Microsoft Windows machine, something like this hopefully works:
% 
% mysqldump ... | ssh -C myoffice mysql -u username -p pass

I haven't played with ssh compression to know how well it works (and I
should probably have used bzip2 in my example to squeeze out any extra
little bit), and I *have* seen problems with ssh installs that do not
compress, but I agree that that looks right (and more elegant :-) to me.


% 
% > % HTH,
% > 
% > Ditto :-)
% 
% ... :-)

*grin*


% 
% 
%     Benjamin.
% 
% -- 
% [EMAIL PROTECTED]


HTH & HAND

mysql query,
:-D
- -- 
David T-G                      * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/      Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE+NnYJGb7uCXufRwARAkAEAKC2sBP64ZY589lM5TP0MM5G8GM5wwCg59l5
qdMX/g+LwfnraPdedAsWpJg=
=1Xc7
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to