From owner-freebsd-questions@freebsd.org Thu Apr 25 15:28:12 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 558BE159A3BC for ; Thu, 25 Apr 2019 15:28:12 +0000 (UTC) (envelope-from dr.klepp@gmx.at) Received: from vie01a-dmta-at52-1.mx.upcmail.net (vie01a-dmta-at52-1.mx.upcmail.net [62.179.121.142]) (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 E18568A49A for ; Thu, 25 Apr 2019 15:28:11 +0000 (UTC) (envelope-from dr.klepp@gmx.at) Received: from [172.31.216.41] (helo=vie01a-pemc-psmtp-at50) by vie01a-dmta-at52.mx.upcmail.net with esmtp (Exim 4.91) (envelope-from ) id 1hJgI6-0004MU-O7 for freebsd-questions@freebsd.org; Thu, 25 Apr 2019 17:28:02 +0200 Received: from t61.lan ([85.126.97.210]) by vie01a-pemc-psmtp-at50 with SMTP @ mailcloud.upcmail.net id 4fU02000p4YLlkt0BfU0Vq; Thu, 25 Apr 2019 17:28:00 +0200 X-SourceIP: 85.126.97.210 X-CNFS-Analysis: v=2.2 cv=O6RJhF1W c=1 sm=2 tr=0 a=/Ac8Q0O/YFE5LOLfUiYZVw==:117 a=/Ac8Q0O/YFE5LOLfUiYZVw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=yMhMjlubAAAA:8 a=WuKURsLIClpcx4tknXYA:9 a=QEXdDO2ut3YA:10 From: "Dr. Nikolaus Klepp" To: freebsd-questions@freebsd.org Subject: Re: saving "zfs send" to a Windows host Date: Thu, 25 Apr 2019 17:28:15 +0200 User-Agent: KMail/1.9.10 References: <20190423054243.GA4659@admin.sibptus.ru> <201904230926.36122.dr.klepp@gmx.at> <20190425145210.GA62061@admin.sibptus.ru> In-Reply-To: <20190425145210.GA62061@admin.sibptus.ru> X-KMail-QuotePrefix: > MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201904251728.15848.dr.klepp@gmx.at> X-Rspamd-Queue-Id: E18568A49A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.986,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 15:28:12 -0000 Anno domini 2019 Thu, 25 Apr 21:52:10 +0700 Victor Sudakov scripsit: > Dr. Nikolaus Klepp wrote: > > > What is the most convenient way to stream a "zfs send" output through > > > the network to a file on a Windows host, for backup purposes? > > > > > > I used to use mount_smbfs to mount a Windows share and capture "zfs > > > send" output to a file, but now that SMBv1 is not supported anymore, > > > mount_smbfs has become useless. > > > > > > I don't mind installing some agent to the Windows host which will be > > > able to receive "zfs send" output to a network port (through netcat for > > > example) and save it there, but I don't know what it could be. It should > > > also support some form of authentication (at least not permit an > > > arbitrary host to overwrite the backups). > > > > > > Can you recommend something? > > > > > > > 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 ... -- Please do not email me anything that you are not comfortable also sharing with the NSA, CIA ...