Minor enhancements

pull/5/head
deajan 10 years ago
parent 3eec869e92
commit d0510d6c67

@ -3,8 +3,8 @@
PROGRAM="Osync" # Rsync based two way sync engine with fault tolerance
AUTHOR="(L) 2013-2014 by Orsiris \"Ozy\" de Jong"
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
PROGRAM_VERSION=0.99RC3
PROGRAM_BUILD=2705201403
PROGRAM_VERSION=0.99RC3+
PROGRAM_BUILD=2705201404
## type doesn't work on platforms other than linux (bash). If if doesn't work, always assume output is not a zero exitcode
if ! type -p "$BASH" > /dev/null
@ -232,7 +232,13 @@ function SendAlert
fi
elif type -p sendemail > /dev/null 2>&1
then
$(type -p sendemail) -f $SENDER_MAIL -t $DESTINATION_MAILS -u "Backup alert for $BACKUP_ID" -m "$MAIL_ALERT_MSG" -s $SMTP_SERVER -o username $SMTP_USER -p password $SMTP_PASSWORD > /dev/null 2>&1
if [ "$SMTP_USER" != "" ] && "$SMTP_PASSWORD" != "" ]
then
$SMTP_OPTIONS="-xu $SMTP_USER -xp $SMTP_PASSWORD"
else
$SMTP_OPTIONS=""
fi
$(type -p sendemail) -f $SENDER_MAIL -t $DESTINATION_MAILS -u "Backup alert for $BACKUP_ID" -m "$MAIL_ALERT_MSG" -s $SMTP_SERVER $SMTP_OPTIONS > /dev/null 2>&1
if [ $? != 0 ]
then
Log "WARNING: Cannot send alert email via $(type -p sendemail) !!!"
@ -1869,16 +1875,16 @@ function Usage
echo "--dry Will run osync without actually doing anything; just testing"
echo "--silent Will run osync without any output to stdout, used for cron jobs"
echo "--verbose Increases output"
echo "--stats Adds transfer statistics"
echo "--stats Adds rsync transfer statistics to verbose output"
echo "--no-maxtime Disables any soft and hard execution time checks"
echo "--force-unlock Will override any existing active or dead locks on master and slave replica"
echo "--on-changes Will launch a sync as soon as there is some file activity on master replica"
echo "--on-changes Will launch a sync task after a short wait period if there is some file activity on master replica. You should try daemon mode instead"
echo ""
echo "[QUICKSYNC OPTIONS]"
echo "--master=\"\" Master replica path. Will contain state and backup directory (is mandatory)."
echo "--slave=\"\" Local or remote slave replica path. Can be a ssh uri like ssh://user@host.com:22//path/to/slave/replica (is mandatory)."
echo "--master=\"\" Master replica path. Will contain state and backup directory (is mandatory)"
echo "--slave=\"\" Local or remote slave replica path. Can be a ssh uri like ssh://user@host.com:22//path/to/slave/replica (is mandatory)"
echo "--rsakey=\"\" Alternative path to rsa private key for ssh connection to slave replica"
echo "--sync-id=\"\" Optional task-id to identify this synchronization task when using multiple slaves."
echo "--sync-id=\"\" Optional sync task name to identify this synchronization task when using multiple slaves"
exit 128
}

@ -2,7 +2,7 @@
###### Osync - Rsync based two way sync engine with fault tolerance
###### (L) 2013-2014 by Orsiris "Ozy" de Jong (www.netpower.fr)
###### Config file rev 2705201401
###### Config file rev 2705201402
## ---------- GENERAL OPTIONS
@ -22,17 +22,18 @@ CREATE_DIRS=no
## Log file location. Leaving this empty will create a logfile at /var/log/osync_version_SYNC_ID.log (or current directory if /var/log doesn't exist)
LOGFILE=""
## List of directories to exclude from sync on both sides (rsync patterns, wildcards work).
## Paths are relative to sync dirs. List elements are separated by a semicolon.
RSYNC_EXCLUDE_PATTERN=""
#RSYNC_EXCLUDE_PATTERN="tmp;archives"
## List elements separator char. You may set an alternative seperator char for your directories lists above.
PATH_SEPARATOR_CHAR=";"
## File that contains the list of directories or files to exclude from sync on both sides. Leave this empty if you don't want to use an exclusion file.
## This file has to be in the same directory as the config file
## Paths are relative to sync dirs. One element per line.
RSYNC_EXCLUDE_FROM=""
#RSYNC_EXCLUDE_FROM="exclude.list"
## List elements separator char. You may set an alternative seperator char for your directories lists above.
PATH_SEPARATOR_CHAR=";"
## Generate an alert if master or slave replicas have less free space than given value in KB.
MINIMUM_SPACE=10240
@ -79,7 +80,7 @@ RSYNC_COMPRESS=yes
SOFT_MAX_EXEC_TIME=7200
HARD_MAX_EXEC_TIME=10600
## Minimum time (in seconds) in file monitor mode between modification detection and sync task in order to let copy operations finish.
## Minimum time (in seconds) in file monitor /daemon mode between modification detection and sync task in order to let copy operations finish.
MIN_WAIT=60
## ---------- BACKUP AND DELETION OPTIONS

Loading…
Cancel
Save