Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jul 2012 16:40:20 +0200
From:      claudiu vasadi <claudiu.vasadi@gmail.com>
To:        freebsd-fs@freebsd.org
Subject:   "zfs receive -F" not destroying snapshots that do not exist on the sending side
Message-ID:  <CAM-i3igV6JYfkK6kP-rSNEBhT3Zf0NDLTkrKumeKcYYaUdCAJA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hello list,

Ono our backup machine, I noticed that the old snapshots do not get
deleted. I checked the script that sends snapshots there and it is using
the "-F" flag for "zfs receive" which, according to the man page, should
delete snapshots that do not exist on the sending side.

In my case, it does not. The machines in question are 9-STABLE (around
r236943) exhibiting no problems what so ever. I tried on other machines and
got the same result.

I did a quick test:
zfs create rpool/test
zfs snapshot rpool/test@snap1
zfs snapshot rpool/test@snap2
zfs snapshot rpool/test@snap3
zfs snapshot rpool/test@snap4
zfs send rpool/test@snap1 | ssh -c arcfour ssh backup.local zfs receive -F
backup/test
zfs send -i snap1 rpool/test@snap2 | ssh -c arcfour ssh backup.local zfs
receive -F backup/test
zfs send -i snap2 rpool/test@snap3 | ssh -c arcfour ssh backup.local zfs
receive -F backup/test
zfs destroy rpool/test@snap1
zfs send -i snap3 rpool/test@snap4 | ssh -c arcfour ssh backup.local zfs
receive -F backup/test


I think, snap1 should be deleted at this stage, but it is not. I also tried
sending the initial snapshot with the "-R" flag but the results were the
same.


Is this expected behavior or some bug ?


-- 
Best regards,
Claudiu Vasadi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAM-i3igV6JYfkK6kP-rSNEBhT3Zf0NDLTkrKumeKcYYaUdCAJA>