Revision 55 bin/zfs-snapshot

zfs-snapshot (revision 55)
42 42
#*** ETAPE SUPPRESSION DES SNAPSHOTS OBSELETES ***#
43 43
echo ""
44 44
CPT_SNAP=$($BINZFS list -t snapshot -r $NAME_VOL |cut -d" " -f1 |grep -i $NAME_VOL\@ |wc -l)
45
echo "*** Le nombre de snapshot pour $NAME_VOL est : $CPT_SNAP"
45
echo "*** The number of snapshot to keep for $NAME_VOL is : $CPT_SNAP"
46 46
$BINZFS list -t snapshot -r $NAME_VOL 
47 47

  
48 48
if [ $CPT_SNAP -gt $NB_SNAP ]
49 49
then
50
   echo "*** Detection du snapshot le plus ancien"
50
   echo "*** Detection of the oldest snapshot "
51 51
   for ID_SNAP_OLDER in $($BINZFS list -t snapshot -r $NAME_VOL |cut -d" " -f1 |grep -i $NAME_VOL\@)
52 52
   do
53
      echo "*** Le snapshot le plus ancien est : $ID_SNAP_OLDER"
53
      echo "*** The oldest snapshot is : $ID_SNAP_OLDER"
54 54
      break
55 55
   done
56 56
   $BINZFS destroy $ID_SNAP_OLDER
57 57
   if [ $? -eq 0 ]
58 58
   then
59
      echo "*** Suppression du snapshot $ID_SNAP_OLDER [OK]"
59
      echo "*** Remove the snapshot $ID_SNAP_OLDER [OK]"
60 60
   else
61
      echo "/!\\ Suppression du snapshot $ID_SNAP_OLDER [ERROR]." 1>&2
61
      echo "/!\\ Remove the snapshot $ID_SNAP_OLDER [ERROR]." 1>&2
62 62
   fi
63 63

  
64 64
fi

Also available in: Unified diff