Ignore:
Timestamp:
08/22/13 12:45:04 (16 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
69265de
Parents:
197bdbf
Message:

Add --replicate option to "mksnap" to force immediate replication

File:
1 edited

Legend:

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

    rc684936 raac00e0  
    1818fi 
    1919 
    20 mkZFSSnap "${DATASET}" "" 
     20SNAPNAME="${2}" 
     21if [ -z "${SNAPNAME}" ]; then 
     22  exit_err "No snapshot name specified!" 
     23fi 
     24 
     25REPLICATE="${3}" 
     26 
     27# Make the snapshot now 
     28snapStat=0 
     29 
     30echo_log "Creating snapshot on ${DATASET}" 
     31mkZFSSnap "${DATASET}" "${SNAPNAME}" 
     32if [ $? -ne 0 ] ; then 
     33  echo_log "ERROR: Failed creating snapshot on ${DATASET}" 
     34  queue_msg "Snapshot ERROR" "ERROR: Failed creating snapshot on ${DATASET} @ `date`\n\r`cat $CMDLOG`" 
     35  snapStat=1 
     36else 
     37  queue_msg "Success creating snapshot on ${DATASET} @ `date`\n\r`cat $CMDLOG`" 
     38fi 
     39 
     40# If we failed at any point, sent out a notice 
     41if [ $snapStat -ne 0 ] ; then 
     42   email_msg "FAILED - Manual Snapshot" "`echo_queue_msg`" 
     43fi 
     44 
     45# If we are successful and user wants all notifications, send out a message 
     46if [ $snapStat -eq 0 -a "$EMAILMODE" = "ALL" ] ; then 
     47   email_msg "Success - Manual Snapshot" "`echo_queue_msg`" 
     48fi 
     49 
     50 
     51 
     52# Check if we need to run a replication task for this dataset 
     53if [ "$REPLICATE" = "YES" ] ; then 
     54  ${PROGDIR}/backend/runrep.sh ${DATASET} force 
     55fi 
Note: See TracChangeset for help on using the changeset viewer.