Ignore:
Timestamp:
02/27/14 06:21:58 (9 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
4f9718b
Parents:
97252e15
Message:

Improve listing of ZFS snapshots in life-preserver, also fix a bug with replication,
don't auto-prune the last replicated snapshot, so that zfs send/recv are happy

File:
1 edited

Legend:

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

    r167bbaa3 r042dc70  
    6464  done 
    6565 
     66  # Get the last replicated snapshot 
     67  lastSEND=`zfs get -r backup:lpreserver ${LDATA} | grep LATEST | awk '{$1=$1}1' OFS=" " | tail -1 | cut -d '@' -f 2 | cut -d ' ' -f 1` 
     68 
    6669  num=0 
    6770  for snap in $rSnaps 
     
    7073     cur="`echo $snap | cut -d '-' -f 1`" 
    7174     if [ "$cur" != "auto" ] ; then continue; fi 
     75 
     76     # If this snapshot is the last one replicated, lets skip pruning it for now 
     77     if [ "$cur" = "$lastSEND" ]; then continue; fi 
    7278 
    7379     sec="`echo $snap | cut -d '-' -f 7`" 
Note: See TracChangeset for help on using the changeset viewer.