From owner-freebsd-questions@freebsd.org Thu Apr 25 17:27:54 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0119D159D1EF for ; Thu, 25 Apr 2019 17:27:54 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46A1C8FCB9 for ; Thu, 25 Apr 2019 17:27:53 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([92.195.97.73]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPA (Nemesis) id 1MTzOe-1hBMBv0sle-00R0Ru; Thu, 25 Apr 2019 19:27:45 +0200 Date: Thu, 25 Apr 2019 19:27:44 +0200 From: Polytropon To: Victor Sudakov 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> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:pZ3gSCWbvHagTH2sh2Lb0pJth5QPXc9JYInHfATondQf9uL0y6k k7wyyIyZ3z9yngayKUHyPPbGPLW6ffoDgjpHwpOyKO3dw12cy2zA9Bysrg7VlswON0aiamq UHDVtpK+kdnkwXa5BDks8PZyqKSv6TxoQnjlV+AaMKG2+weMfqc1PKnaBBPB4NXWUNVh3CX k0QaqHxjeHg95wkC/QrtQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ONsHexTu79Y=:Kpla6s+NNwZgEx5CW6vXgy OtXlm9Uo32Kk4avSGH7ArgbtyjjS69oiVeL/qHVHSr3gDAISO2Jy3iVQAx+jmBO60qXTYOLcu sxTgcxJFNa4RkcvoP6Xzb1axNL0UsNeZM5nqoJUvYGIVO4I3wE7XMaHEH/+vNg+rk7cwqYi5c MLOlJ06dgAFQx/zx7GZ5WANc0FH5I7SXd+Fb12HqmUXA4/IMvoOPzcBrWDWtPAy+4d3dpZMLJ /A4uy+o5O2TZfFq+Fog9Q5Z5f/+YwBXQq9b6m0Dn+mIXUTVYMTLi39TKm7XItlxHGPHVQxt2T /M5FG6Jvx6dJOAdO6lf5E22mlUoGzfgE2UBPWP1FrhXn5jgq2jbkFd1IR9s1yESlO80Dw0uUA POAknK2dbt19pjn3hB2sxrefwUhHYDqJhH1FdF68ukbG4rrCR7X63KFe8aaR621o1bCDmktLh jHEZvPvEq+/IX9bZhbSY7puk2P9DHT5w4VMu/5TjN3sVZA+NvWZTt5Zx0CVlhS772zWuRYh3d DoG5tBKDC2UYo4GbdyTvS3Rx3s3Kk46GXQYw38/4hpTsIOGtR3nkdJ37OTylCbKEMmQr8i5Ka twId5nc94/hm63qVo36sAvu1L3RI0Ir5ZxGfjZrvbC4PhVuMeBlSGB8xV336fD5JAV1iwjJUe FpQmKByE/ebFt5RPmr/xc622+UB/0K/QNylyQAI07NYihmOUPqyQC1w1sE4aFk8a7sD6AEpkn lqxkFiGCyWZDwTcvtsBV8h+RamKIKx323uoCdEIrV5w5D6/dpVXwwGmKCEE= X-Rspamd-Queue-Id: 46A1C8FCB9 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.995,0] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Apr 2019 17:27:54 -0000 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, ...