Changeset 680602c


Ignore:
Timestamp:
04/03/14 14:07:44 (4 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0.2
Children:
a547442
Parents:
a3f936c
Message:

Fix a bug when doing snapshot pruning, make sure to check lastSEND for
dates of last replication, so we don't prune snaps which haven't been
sent yet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/lpreserver/backend/runsnap.sh

    re9724ed r680602c  
    6767  lastSEND=`zfs get -r backup:lpreserver ${LDATA} | grep LATEST | awk '{$1=$1}1' OFS=" " | tail -1 | cut -d '@' -f 2 | cut -d ' ' -f 1` 
    6868  if [ -n "$lastSend" ] ; then 
    69      sec="`echo $lastSend | cut -d '-' -f 7`" 
    70      min="`echo $lastSend | cut -d '-' -f 6`" 
    71      hour="`echo $lastSend | cut -d '-' -f 5`" 
    72      day="`echo $lastSend | cut -d '-' -f 4`" 
    73      mon="`echo $lastSend | cut -d '-' -f 3`" 
    74      year="`echo $lastSend | cut -d '-' -f 2`" 
     69     sec="`echo $lastSEND | cut -d '-' -f 7`" 
     70     min="`echo $lastSEND | cut -d '-' -f 6`" 
     71     hour="`echo $lastSEND | cut -d '-' -f 5`" 
     72     day="`echo $lastSEND | cut -d '-' -f 4`" 
     73     mon="`echo $lastSEND | cut -d '-' -f 3`" 
     74     year="`echo $lastSEND | cut -d '-' -f 2`" 
    7575     sendEpoc=`date -j -f "%Y %m %d %H %M %S" "$year $mon $day $hour $min $sec" "+%s"` 
    7676     # Check that this replication target is still active 
Note: See TracChangeset for help on using the changeset viewer.