saving "zfs send" to a Windows host

Victor Sudakov vas at mpeks.tomsk.su
Fri Apr 26 03:30:51 UTC 2019


Polytropon wrote:
> > > > This is good advice, thank you. I've had OpenSSH installed by the
> > > > Windows admin for me, so I can now ssh into that Windows host and even
> > > > public key authentication works:
> > > > 
> > > > root at bsd:~ # ssh winhost ver
> > > > 
> > > > Microsoft Windows [Version 6.1.7601]
> > > > root at bsd:~ # 
> > > > 
> > > > Now that I would like to send the backups to winhost to b:\my_backups\,
> > > > what remote command should I call there? In Unix I would call "cat" or
> > > > "dd" or even "rmt", but here?
> > > > 
> > > > root at bsd:~ # zfs send zroot/var/mail at test | ssh winhost "what?" 
> > > > 
> > > > I guess I need something in Windows that would accept a byte stream on
> > > > stdin and save it to a file in b:\my_backups\
> > > > 
> > > > Any thoughts?
> > > > 
> > > 
> > > The "cat" of windows was/is "type" .. I think ...
> > 
> > No, "type" does not seem to accept a byte stream from stdin, at least
> > the way Unix "cat" or "dd" do:
> > 
> > "echo test | type > q.txt" produces a syntax error, and 
> > 
> > "echo test | type con > q.txt" waits forever, and when interrupted, it
> > produces an empty q.txt
> 
> If I remember correctly, the device name is "CON:" (with a : at the
> end), but I'm not sure, it's so far away... ;-)

The ":" makes no difference. 

"echo test | type con: > q.txt" waits forever, and when interrupted, 
produces an empty q.txt

> 
> Maybe you can use a command like "COPY /B CON: Q.TXT"?
> 

No, does not work either.

It seems to me that "CON" or "CON:" is not really /dev/stdin, it's
rather /dev/tty. Or probably it's CMD.EXE's stdin, not TYPE.EXE's stdin.
Whatever. 

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49 at fidonet http://vas.tomsk.ru/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20190426/18ecc9f6/attachment.sig>


More information about the freebsd-questions mailing list