Hi there, While receiving incremental streams, "zfs recv" ignores the existing snapshots and stops without processing rest of the streams. Here is the scenario. # zfs snapshot spath at s1 # zfs send spath at s1 | zfs recv dpath # zfs snapshot spath at s2 # zfs snapshot spath at s3 # zfs send -I spath at s1 spath at s3 | zfs recv dpath # zfs snapshot spath at s4 # zfs snapshot spath at s5 # zfs send -v -I spath at s1 spath at s5 | zfs recv -v dpath sending from @s1 to spath at s2 sending from @s2 to spath at s3 sending from @s3 to spath at s4 sending from @s4 to spath at s5 receiving incremental stream of spath at s2 into dpath at s2 snap dpath at s2 already exists; ignoring # It should ignore s2, s3 and recv s4 and s5, but it stopped with first ignore. It works if I send s4 and s5 alone, but I need to always send it from s1. Any help would be appreciated. Thanks - Ilavarasu -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20091028/fc2ace4d/attachment.html>
Raghav Ilavarasu wrote:> Hi there, > > While receiving incremental streams, "zfs recv" ignores the existing > snapshots and stops without processing rest of the streams. > > Here is the scenario. > > # zfs snapshot spath at s1 > > # zfs send spath at s1 | zfs recv dpath > > # zfs snapshot spath at s2 > > # zfs snapshot spath at s3 > > # zfs send -I spath at s1 spath at s3 | zfs recv dpath > > # zfs snapshot spath at s4 > > # zfs snapshot spath at s5 > > # zfs send -v -I spath at s1 spath at s5 | zfs recv -v dpath > sending from @s1 to spath at s2 > sending from @s2 to spath at s3 > sending from @s3 to spath at s4 > sending from @s4 to spath at s5 > receiving incremental stream of spath at s2 into dpath at s2 > snap dpath at s2 already exists; ignoring > # > > It should ignore s2, s3 and recv s4 and s5, but it stopped with first > ignore. It works if I send s4 and s5 alone, but I need to always send > it from s1. >The obvious question is why do you always send it from s1? -- Ian.
Why are you sending from s1? If you''ve already sent that, the logical thing to do is send from s3 the next time. If you really do need to send from the start every time, you can do that with the -f option on zfs receive, to force it to overwrite newer changes, but you are going to be sending far more data than you need every time. -- This message posted from opensolaris.org
Ross wrote: [context, please!]> Why are you sending from s1? If you''ve already sent that, the logical thing to do is send from s3 the next time. > > If you really do need to send from the start every time, you can do that with the -f option on zfs receive, to force it to overwrite newer changes, but you are going to be sending far more data than you need every time. >-F (note the caps) won''t overwrite an existing snapshot. It has to be deleted first. -- Ian.