Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* btrfs send / receive via netcat, fails halfway?
@ 2021-01-10 10:34  
  2021-01-10 11:07 ` Forza
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From:   @ 2021-01-10 10:34 UTC (permalink / raw)
  To: linux-btrfs

­I'm trying to transfer a btrfs snapshot via the network.

First attempt: Both NC programs don't exit after the transfer is complete. When I ctrl-C the sending side, the receiving side exits OK.

btrfs subvolume delete /mnt/rec/snapshots/*
receive side:
# nc -l -p 6790 | btrfs receive /mnt/rec/snapshots
At subvol 0

sending side:
# btrfs send  /mnt/send/snapshots/0 | nc -v 127.0.0.1 6790
At subvol /mnt/send/snapshots/0
localhost [127.0.0.1] 6790 (hnmp) open



Second attempt: both nc programs exit ok at snapshot 0,1,2, but snapshot3 fails halfway, and 4 fails, as 3 is not complete. 
receive side:
# nc -l -p 6790 | btrfs receive /mnt/rec/snapshots
At subvol 0
# nc -l -p 6790 | btrfs receive /mnt/rec/snapshots
At snapshot 1
# nc -l -p 6790 | btrfs receive /mnt/rec/snapshots
At snapshot 2
# nc -l -p 6790 | btrfs receive /mnt/rec/snapshots
At snapshot 3
read(net): Connection reset by peer
ERROR: short read from stream: expected 49183 read 10450
# nc -l -p 6790 | btrfs receive /mnt/rec/snapshots
At snapshot 4
ERROR: cannot find parent subvolume
write(stdout): Broken pipe

sending side:
# btrfs send  /mnt/send/snapshots/0 | nc -v -c 127.0.0.1 6790
At subvol /mnt/send/snapshots/0
localhost [127.0.0.1] 6790 (hnmp) open
# btrfs send -p /mnt/send/snapshots/0 /mnt/send/snapshots/1 | nc -v -c  127.0.0.1 6790
At subvol /mnt/send/snapshots/1
localhost [127.0.0.1] 6790 (hnmp) open
# btrfs send -p /mnt/send/snapshots/1 /mnt/send/snapshots/2 | nc -v -c  127.0.0.1 6790
At subvol /mnt/send/snapshots/2
localhost [127.0.0.1] 6790 (hnmp) open
# btrfs send -p /mnt/send/snapshots/2 /mnt/send/snapshots/3 | nc -v -c  127.0.0.1 6790
At subvol /mnt/send/snapshots/3
localhost [127.0.0.1] 6790 (hnmp) open
# btrfs send -p /mnt/send/snapshots/3 /mnt/send/snapshots/4 | nc -v -c  127.0.0.1 6790
At subvol /mnt/send/snapshots/4
localhost [127.0.0.1] 6790 (hnmp) open
write(net): Connection reset by peer




---

Take your mailboxes with you. Free, fast and secure Mail & Cloud: https://www.eclipso.eu - Time to change!



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-01-10 13:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-10 10:34 btrfs send / receive via netcat, fails halfway?  
2021-01-10 11:07 ` Forza
2021-01-10 11:37 ` Roman Mamedov
2021-01-10 12:38   `  
2021-01-10 11:47 ` Hugo Mills
2021-01-10 13:27   ` Hugo Mills

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox