Question
Already I can check each snapshot of a filesystem individually, manually.
I would prefer to check all at once (all with a single command or script). Please:
- can that be done with a script?
The answer should be good for file systems with a space within the name.
Background
From the man page for zfs(8):
zfs holds [-H] [-r] snapshot…
… -r
Specifies that a hold with the given tag is applied recursively to the snapshots of all descendent file systems.
I wondered whether recent snapshots are treated as descendants of an older snapshot. No:
Last login: Sat Dec 8 09:02:26 on ttys003
macbookpro08-centrim:~ gjp22$ zfs holds -r gjp22@2012-12-08-081957
NAME TAG TIMESTAMP
macbookpro08-centrim:~ gjp22$ zfs holds -r gjp22@2012-10-28-212255
NAME TAG TIMESTAMP
gjp22@2012-10-28-212255 problem with LocalStorage for WOT for Safari Mon Oct 29 6:44 2012
macbookpro08-centrim:~ gjp22$ zfs hold experiment gjp22@2012-12-08-081957
macbookpro08-centrim:~ gjp22$ zfs holds -r gjp22@2012-10-28-212255
NAME TAG TIMESTAMP
gjp22@2012-10-28-212255 problem with LocalStorage for WOT for Safari Mon Oct 29 6:44 2012
macbookpro08-centrim:~ gjp22$ zfs holds -r gjp22@2012-12-08-081957
NAME TAG TIMESTAMP
gjp22@2012-12-08-081957 experiment Sat Dec 8 9:04 2012
macbookpro08-centrim:~ gjp22$ zfs holds -r gjp22@2012-10-28-212255
NAME TAG TIMESTAMP
gjp22@2012-10-28-212255 problem with LocalStorage for WOT for Safari Mon Oct 29 6:44 2012
macbookpro08-centrim:~ gjp22$
Clarification
I do not plan to combine both checks and destruction in a single command or script. This question is essentially about the checks.