diff --git a/CHANGELOG.md b/CHANGELOG.md index 5619e37..198c6dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,16 +5,26 @@ FUTURE IMPROVEMENTS - Tree function merge (current and after tree functions are the same except for output filename and logging) - Tree functions execute piped commands (grep, awk) on master when launched on remote slave which can cause more bandwith usage - Exit trap function must also kill child processes -- Make osync run on Cygwin for Windows compatibility +- Make osync run on MSYS for Windows compatibility ? KNOWN ISSUES ------------ - If master and remote slave systems don't have rsync in the same path, execution may fail (RSYNC_PATH is always configured on master, even when executed on slave) +- When remote system is Msys, Windows' find.exe is used instead of MSYS find RECENT CHANGES -------------- +- Merged MSYS (MinGW minimal system) bash compatibility under Windows from Obackup + - Added check for /var/log directory + - Added check for shared memory directory + - Added alternative way to kill child processes for other OSes and especially for MSYS (which is a very odd way) + - Added Sendemail.exe support for windows Alerting + - Replaced which commend by type -p, as it is more portable + - Added support for ping.exe from windows + - Forced usage of MSYS find instead of Windows' find.exe on master + - Added an optionnal remote rsync executable path parameter - Fixed an issue with CheckConnectivity3rdPartyHosts - Added an option to stop execution if a local / remote command fails - Improved forced quit command by killing all child processes diff --git a/osync.sh b/osync.sh index c504649..ef6f219 100755 --- a/osync.sh +++ b/osync.sh @@ -1455,22 +1455,32 @@ function Init RSYNC_SSH_CMD="$(type -p ssh) $SSH_COMP -i $SSH_RSA_PRIVATE_KEY -p $REMOTE_PORT" fi - ## Set rsync executable and rsync path (for remote sudo rsync) + ## Support for older config files without RSYNC_EXECUTABLE option if [ "$RSYNC_EXECUTABLE" == "" ] then RSYNC_EXECUTABLE=rsync fi + ## Sudo execution option if [ "$SUDO_EXEC" == "yes" ] then - RSYNC_PATH="sudo $(type -p $RSYNC_EXECUTABLE)" + if [ "$RSYNC_REMOTE_PATH" != "" ] + then + RSYNC_PATH="sudo $(type -p $RSYNC_REMOTE_PATH)/$RSYNC_EXECUTABLE)" + else + RSYNC_PATH="sudo $RSYNC_EXECUTABLE" + fi COMMAND_SUDO="sudo" else - RSYNC_PATH="$(type -p $RSYNC_EXECUTABLE)" + if [ "$RSYNC_REMOTE_PATH" != "" ] + then + RSYNC_PATH="$(type -p $RSYNC_REMOTE_PATH)/$RSYNC_EXECUTABLE)" + else + RSYNC_PATH="$RSYNC_EXECUTABLE" + fi COMMAND_SUDO="" fi - ## Set rsync options RSYNC_ARGS="-" if [ "$PRESERVE_ACL" == "yes" ] diff --git a/sync.conf b/sync.conf index 0262b72..ae061f5 100755 --- a/sync.conf +++ b/sync.conf @@ -2,12 +2,12 @@ ###### Osync - Rsync based two way sync engine with fault tolerance ###### (L) 2013 by Orsiris "Ozy" de Jong (www.netpower.fr) -#### Config file rev 1010201301 +#### Config file rev 1010201302 ## Sync job identification, any string you want, no spaces SYNC_ID="sync_test" -## Leaving this empty will create a logfile at /var/log/osync_version_SYNC_ID.log +## 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="" ## Directories to synchronize @@ -47,6 +47,8 @@ REMOTE_HOST_PING=no ## If you use this function, you should set more than one 3rd party host, and be sure you can ping them. ## Be aware some DNS like opendns redirect false hostnames. Also, this adds an extra execution time of a bit less than a minute. REMOTE_3RD_PARTY_HOSTS="www.kernel.org www.google.fr" +## Remote rsync executable path. Leave this empty in most cases +REMOTE_RSYNC_PATH="" ## Preserve ACLS. Make sure target FS can hold ACLs or you'll get loads of errors. PRESERVE_ACL=no