openzfsonwindows / openzfs

OpenZFS on Linux and FreeBSD
https://openzfs.github.io/openzfs-docs
Other
438 stars 15 forks source link

zfs send | zfs receive not working #96

Open andrewc12 opened 2 years ago

andrewc12 commented 2 years ago

System information

Type Version/Name
Distribution Name Microsoft Windows
Distribution Version Version 21H2 (OS Build 22000.613)
Kernel Version
Architecture x86-64
OpenZFS Version f899f5bced75c2d90489586129a26d1b11ab2d42

Describe the problem you're observing

I can't zfs receive a stream I have made with zfs send

Describe how to reproduce the problem

zfs send tank5 | zfs receive tank5/receive cannot receive: invalid stream (bad magic number)

Include any warning/errors/backtraces from the system logs

tamlin-mike commented 2 years ago

Could it be that stdin (and/or stdout) is in cooked mode? If so, one of the following might help

  1. freopen(NULL, "rb", stdin);
  2. https://web.archive.org/web/20090907131154/http://www.cs.toronto.edu:80/~ramona/cosmin/TA/prog/sysconf/
andrewc12 commented 2 years ago

Hi thanks for that. If I remember correctly, this problem might have been fixed. I'll test it out and let you know later today.

oldshensheep commented 1 year ago

I had the same issue in PowerShell but not in CMD

derritter88 commented 10 months ago

Same for me with rc6

NoOneAtHome commented 9 months ago

happens to me too with RC6 CMD works fine powershell throws: cannot receive: invalid stream (bad magic number)