Date: Thu, 25 Apr 2019 19:27:44 +0200 From: Polytropon <freebsd@edvax.de> To: Victor Sudakov <vas@mpeks.tomsk.su> Cc: freebsd-questions@freebsd.org Subject: Re: saving "zfs send" to a Windows host Message-ID: <20190425192744.e0d0acb4.freebsd@edvax.de> In-Reply-To: <20190425163412.GA63892@admin.sibptus.ru> References: <20190423054243.GA4659@admin.sibptus.ru> <201904230926.36122.dr.klepp@gmx.at> <20190425145210.GA62061@admin.sibptus.ru> <201904251728.15848.dr.klepp@gmx.at> <20190425163412.GA63892@admin.sibptus.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 25 Apr 2019 23:34:12 +0700, Victor Sudakov wrote: > Dr. Nikolaus Klepp wrote: > > > > Use sshd, just like you would in unix only environment. Install > > > > OpenSSH on windows (e.g. > > > > https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse > > > > ), use public key authentication only without passphrase (yes, > > > > security, I know, but you probably want the thing wirking first). I do > > > > not know if the m$ sshd supports chroot, but if it does, use it. > > > > > > 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@bsd:~ # ssh winhost ver > > > > > > Microsoft Windows [Version 6.1.7601] > > > root@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@bsd:~ # zfs send zroot/var/mail@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... ;-) Maybe you can use a command like "COPY /B CON: Q.TXT"? -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190425192744.e0d0acb4.freebsd>