Comments on: Not-as-simple perl script for ZFS snapshot auditing http://writequit.org/blog/2007/06/05/not-as-simple-perl-script-for-zfs-snapshot-auditing/ Tu fui, ego eris Fri, 15 Aug 2014 11:26:27 +0000 hourly 1 http://wordpress.org/?v=4.1.5 By: Dude-man http://writequit.org/blog/2007/06/05/not-as-simple-perl-script-for-zfs-snapshot-auditing/comment-page-1/#comment-1033 Fri, 15 Aug 2014 11:26:27 +0000 http://writequit.org/blog/?p=55#comment-1033 Heres a bash script which I think does something simular but uses zfs diff to find files that differ… just a hack

pass snapshot name as first argument

#!/bin/bash
datasetANDsnapshot=$1

snapshot=$(echo $datasetANDsnapshot | cut -d’@’ -f 2)
datasetName=$(echo $datasetANDsnapshot | cut -d’@’ -f 1)

echo “Looking for differences for ” $datasetName”@”$snapshot

for f in $(zfs diff $datasetANDsnapshot | grep “^M” | awk ‘{print $2;}’)
do
echo “+++++++++++++++++++”
echo “File modified from ”
diff $(zfs get mountpoint -o value $datasetName -H)”.zfs/snapshot/$snapshot$f” $f
done

]]>
By: Dude-man http://writequit.org/blog/2007/06/05/not-as-simple-perl-script-for-zfs-snapshot-auditing/comment-page-1/#comment-1032 Fri, 15 Aug 2014 08:52:47 +0000 http://writequit.org/blog/?p=55#comment-1032 Will its a very old post/script… but looks usefull still

Somewhere in the code

zfs get mountpoint -o value $datasetName -H

Would substitue the right mount point… don’t know where yet

]]>
By: Lee Hinman http://writequit.org/blog/2007/06/05/not-as-simple-perl-script-for-zfs-snapshot-auditing/comment-page-1/#comment-85 Thu, 27 Sep 2007 20:22:19 +0000 http://writequit.org/blog/?p=55#comment-85 Chris: Thanks for pointing that out, I wasn’t considering that the mountpoint of the FS can be different than the name, I’ll have to work on an update, thanks!

]]>
By: Chris http://writequit.org/blog/2007/06/05/not-as-simple-perl-script-for-zfs-snapshot-auditing/comment-page-1/#comment-87 Thu, 27 Sep 2007 17:08:18 +0000 http://writequit.org/blog/?p=55#comment-87 great script, but it does not work quite well for me…
# zfs list
mypool/d 270G 3.69G 145G /d/d2
mypool/d@2006_10_month 3.72G – 123G –
I have mountpint as /d/d2, your script is looking for /mypool/d, so if I create symbolic link /mypool/d pointing to /d/d2 then it works.

anyway great tool…

Chris

]]>
By: Mark J Musante http://writequit.org/blog/2007/06/05/not-as-simple-perl-script-for-zfs-snapshot-auditing/comment-page-1/#comment-86 Tue, 05 Jun 2007 23:27:47 +0000 http://writequit.org/blog/?p=55#comment-86 Very cool. You should submit it to Sun’s bigadmin site (www.sun.com/bigadmin)

]]>