Revision 55

bin/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
bin/disable-snapshot (revision 55)
40 40
function interactive {
41 41

  
42 42
$BINZFS list
43
echo "*** Nom du volume pour desactiver les snapshot :"
43
echo "*** Enter a ZFS volume/filesystem name :"
44 44
while read inputline
45 45
do
46 46
   if [ "$inputline" != "" ]
......
54 54
            /bin/rm -f $DIR_CONF_SNAPSHOT$FILE_NAME.conf
55 55
            if [ $? -eq 0 ]
56 56
            then
57
               echo "*** Suppression du fichier conf $DIR_CONF_SNAPSHOT$FILE_NAME.conf [OK]"
57
               echo "*** Remove the configuration file $DIR_CONF_SNAPSHOT$FILE_NAME.conf [OK]"
58 58
            else
59
               echo "/!\\ Suppression du fichier $DIR_CONF_SNAPSHOT$FILE_NAME.conf [ERROR] /!\\"
59
               echo "/!\\ Remove the configuration file  $DIR_CONF_SNAPSHOT$FILE_NAME.conf [ERROR] /!\\"
60 60
               exit
61 61
            fi
62 62
         else
63
            echo "*** Le fichier de conf $DIR_CONF_SNAPSHOT$FILE_NAME.conf n'existe pas"
63
            echo "*** The configuration file $DIR_CONF_SNAPSHOT$FILE_NAME.conf does not exist"
64 64
         fi
65 65

  
66 66
         if [ -e $DIR_CRON$FILE_NAME ]
......
68 68
            /bin/rm $DIR_CRON$FILE_NAME
69 69
            if [ $? -eq 0 ]
70 70
            then
71
               echo "*** Suppression du fichier de cron $DIR_CRON$FILE_NAME [OK]"
71
               echo "*** Remove cron file $DIR_CRON$FILE_NAME [OK]"
72 72
               break
73 73
            else
74
               echo "/!\\ Suppression du fichier de cron $DIR_CRON$FILE_NAME /!\\"
74
               echo "/!\\ Remove cron file $DIR_CRON$FILE_NAME [ERROR] /!\\"
75 75
               exit
76 76
            fi
77 77
         else
78
            echo "*** Le fichier cron $DIR_CRON$FILE_NAME n'existe pas"
78
            echo "*** The cron file $DIR_CRON$FILE_NAME does not exist"
79 79
            break
80 80
         fi
81 81
      fi
82 82
   fi
83
   echo "*** Nom du volume pour desactiver les snapshot :"
83
   echo "*** Enter a ZFS volume/filesystem name :"
84 84
done
85 85
exit 0
86 86
}

Also available in: Unified diff