Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add runrep.sh, which we will use to start replication

  • Loading branch information...
commit 9fa96a3380b9575ef94e92dfb125f20e5ecc9164 1 parent 21a1adc
Kris Moore kmoore134 authored
Showing with 32 additions and 0 deletions.
  1. +32 −0 src-sh/lpreserver/backend/runrep.sh
32 src-sh/lpreserver/backend/runrep.sh
View
@@ -0,0 +1,32 @@
+#!/bin/sh
+# Do the replication for a specific dataset
+######################################################################
+
+# Set our vars
+PROGDIR="/usr/local/share/lpreserver"
+
+# Source our functions
+. /usr/local/share/pcbsd/scripts/functions.sh
+. ${PROGDIR}/backend/functions.sh
+
+DATASET="${1}"
+
+if [ -z "${DATASET}" ]; then
+ exit_err "No dataset specified!"
+fi
+
+# Lets start by building a list of props to keep
+pTag=`echo $DATASET | md5`
+
+if [ "$RECURMODE" = "ON" ] ; then
+ zfs get -r all $DATASET | grep ' local$' | awk '{$1=$1}1' OFS=" " > /tmp/.propList.$$
+else
+ zfs get all $DATASET | grep ' local$' | awk '{$1=$1}1' OFS=" " > /tmp/.propList.$$
+fi
+
+cat /tmp/.propList.$$
+rm /tmp/.propList.$$
+
+if [ "$EMAILMODE" = "ALL" ] ; then
+ #email_msg "Automated Snapshot" "`echo_queue_msg`"
+fi
Please sign in to comment.
Something went wrong with that request. Please try again.