Révision 12

bin/zfs-replica (revision 12)
64 64

  
65 65
}
66 66

  
67
function checkCoherence {
68
  ssh -o BatchMode=yes root@$server zfs list $namereplica
69
  if [ "$?" != "0" ]
70
  then
71
     return false
72
  fi
73

  
74
}
75

  
67 76
function del_old_snapshot {
68 77
#*** ETAPE SUPPRESSION DES SNAPSHOTS OBSELETES ***#
69 78
if [[ "$server" == "" ]]
......
239 248
   echo "$zfsSnapshot $fileconf"
240 249
fi
241 250

  
251
valchk=checkCoherence
252
if [[ "$valchk" == "false" ]] || [[ "$lastsnapshotReplicated" != "" ]]
253
then
254
   echo "Replication by incremental snapshot is not possible"
255
   echo "Start FULL Replication ..."
256
   while read line
257
   do
258
     snapshot2replicate=$(echo $line |echo $line |sed -e "s/ \+/ /g"|cut -d " " -f1)
259
   done <<< "$(/sbin/zfs list -H -r -t snapshot $namevolfs)"
260
   fullreplication
261
fi
262

  
263

  
242 264
#--- FULL REPLICATION ---#
243 265
if [[ $NBsnaphot -eq 1 ]] || [[ "$lastsnapshotReplicated" == "" ]]
244 266
then

Formats disponibles : Unified diff