This repository has been archived by the owner on Dec 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add runrep.sh, which we will use to start replication
- Loading branch information
Kris Moore
committed
Aug 1, 2013
1 parent
21a1adc
commit 9fa96a3
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |