Paul B. Henson via illumos-zfs
2014-07-15 21:21:49 UTC
I'm trying to figure out what the best way is to determine if a given file
system has changed at all since a given snapshot of it. At this point, the
only reliable method we have found is to run a zfs diff between the snapshot
and the file system and see if it generates any output. While that certainly
works, it seems a bit inefficient, as zfs diff will enumerate all of the
actual changes, whereas all I actually care about is whether or not any
change occurred. Is there any better way to do this? If not, what about an
option to zfs diff that causes it to only return whether or not there are
changes, but not the actual changes? Whether that was via some type of
output or a status return code, it could then stop processing as soon as it
sees the first change, rather than continuing on to enumerate all of them.
Thanks.
system has changed at all since a given snapshot of it. At this point, the
only reliable method we have found is to run a zfs diff between the snapshot
and the file system and see if it generates any output. While that certainly
works, it seems a bit inefficient, as zfs diff will enumerate all of the
actual changes, whereas all I actually care about is whether or not any
change occurred. Is there any better way to do this? If not, what about an
option to zfs diff that causes it to only return whether or not there are
changes, but not the actual changes? Whether that was via some type of
output or a status return code, it could then stop processing as soon as it
sees the first change, rather than continuing on to enumerate all of them.
Thanks.