From owner-freebsd-questions@freebsd.org Fri Apr 26 03:30:51 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 575471586E81 for ; Fri, 26 Apr 2019 03:30:51 +0000 (UTC) (envelope-from vas@mpeks.tomsk.su) Received: from admin.sibptus.ru (admin.sibptus.ru [IPv6:2001:19f0:5001:21dc::10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 913F6805CE for ; Fri, 26 Apr 2019 03:30:50 +0000 (UTC) (envelope-from vas@mpeks.tomsk.su) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sibptus.ru; s=20181118; h=In-Reply-To:Message-ID:Subject:To:From:Date; bh=SWIi/bWVbxov8QelXftrSmGDN2MNtjrFMBEuvzPQHPI=; b=OtaiBU5eJ8NObr1fN2+YVr/xGz VEywkopa2ebOJjgp8rDJX+UBPjPKbmFqEDUPkQRK9Y0fUxOBUw9w28q0vP7kQdmX2ybhgJx5nAvKq x0ejQvrgu5qd1ef8dM0Cq6OChY0RoJkPUt+7n68T/29u2CLXq1kkCuxQDsiRmX3n+cGo=; Received: from vas by admin.sibptus.ru with local (Exim 4.92 (FreeBSD)) (envelope-from ) id 1hJrZZ-000L1U-3D for freebsd-questions@freebsd.org; Fri, 26 Apr 2019 10:30:49 +0700 Date: Fri, 26 Apr 2019 10:30:49 +0700 From: Victor Sudakov To: freebsd-questions@freebsd.org Subject: Re: saving "zfs send" to a Windows host Message-ID: <20190426033049.GA80168@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> <20190425192744.e0d0acb4.freebsd@edvax.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7JfCtLOvnd9MIVvH" Content-Disposition: inline In-Reply-To: <20190425192744.e0d0acb4.freebsd@edvax.de> X-PGP-Key: http://www.dreamwidth.org/pubkey?user=victor_sudakov X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 User-Agent: Mutt/1.11.4 (2019-03-13) Sender: Victor Sudakov 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: Fri, 26 Apr 2019 03:30:51 -0000 --7JfCtLOvnd9MIVvH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 e= ven > > > > public key authentication works: > > > >=20 > > > > root@bsd:~ # ssh winhost ver > > > >=20 > > > > Microsoft Windows [Version 6.1.7601] > > > > root@bsd:~ #=20 > > > >=20 > > > > Now that I would like to send the backups to winhost to b:\my_backu= ps\, > > > > what remote command should I call there? In Unix I would call "cat"= or > > > > "dd" or even "rmt", but here? > > > >=20 > > > > root@bsd:~ # zfs send zroot/var/mail@test | ssh winhost "what?"=20 > > > >=20 > > > > 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\ > > > >=20 > > > > Any thoughts? > > > >=20 > > >=20 > > > The "cat" of windows was/is "type" .. I think ... > >=20 > > No, "type" does not seem to accept a byte stream from stdin, at least > > the way Unix "cat" or "dd" do: > >=20 > > "echo test | type > q.txt" produces a syntax error, and=20 > >=20 > > "echo test | type con > q.txt" waits forever, and when interrupted, it > > produces an empty q.txt >=20 > 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.=20 "echo test | type con: > q.txt" waits forever, and when interrupted,=20 produces an empty q.txt >=20 > Maybe you can use a command like "COPY /B CON: Q.TXT"? >=20 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.=20 --=20 Victor Sudakov, VAS4-RIPE, VAS47-RIPN 2:5005/49@fidonet http://vas.tomsk.ru/ --7JfCtLOvnd9MIVvH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJcwntpAAoJEA2k8lmbXsY08mYH/A6k4D8bq5R1wk1IFJTPPCyI 3sCLlUDpCwXQDEm8C5X3b/ZbnQIhFBZ+B42+Y8I4rFH3uTO9+8mVjQCKR6j/Xcia 4BcZvXmW2jaR/noFUawN5rxIIBE3wItFBOg1Z8Gc8Ak9DN4q0TyIm7yZlQ11xQtd 3svtz5sRzmSusMSYLvhTwu/hqVXbEDFiCawhW5lhb3UJe+zZY8rHhYzjYOLJMkS9 KmLfcsKQDsUC4prnZ2MwLV50vTmXjWa+CSHIurtm2wJ5koK5oWugP3kzYXFoa9Sq t8NOQ/VL7U8H87CIhG1MBW+QwKq754cXPny7MgRW3wuToqd3aP18OI850WggO5o= =R3WJ -----END PGP SIGNATURE----- --7JfCtLOvnd9MIVvH--