Added keep dir symlinks parameter
This commit is contained in:
parent
d0510d6c67
commit
5a2fb4f286
|
@ -25,6 +25,7 @@ UNDER WORK
|
||||||
RECENT CHANGES
|
RECENT CHANGES
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
- Added treat dir symlink as dir parameter
|
||||||
- 27 May 2014: Osync 0.99 RC3
|
- 27 May 2014: Osync 0.99 RC3
|
||||||
- Additionnal delete fix for *BSD and MSYS (deleted file list not created right)
|
- Additionnal delete fix for *BSD and MSYS (deleted file list not created right)
|
||||||
- Fixed dry mode to use non dry after run treelists to create delete lists
|
- Fixed dry mode to use non dry after run treelists to create delete lists
|
||||||
|
|
11
osync.sh
11
osync.sh
|
@ -4,7 +4,7 @@ PROGRAM="Osync" # Rsync based two way sync engine with fault tolerance
|
||||||
AUTHOR="(L) 2013-2014 by Orsiris \"Ozy\" de Jong"
|
AUTHOR="(L) 2013-2014 by Orsiris \"Ozy\" de Jong"
|
||||||
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
|
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
|
||||||
PROGRAM_VERSION=0.99RC3+
|
PROGRAM_VERSION=0.99RC3+
|
||||||
PROGRAM_BUILD=2705201404
|
PROGRAM_BUILD=2705201405
|
||||||
|
|
||||||
## type doesn't work on platforms other than linux (bash). If if doesn't work, always assume output is not a zero exitcode
|
## 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
|
if ! type -p "$BASH" > /dev/null
|
||||||
|
@ -1733,6 +1733,10 @@ function Init
|
||||||
then
|
then
|
||||||
RSYNC_ARGS=$RSYNC_ARGS" -L"
|
RSYNC_ARGS=$RSYNC_ARGS" -L"
|
||||||
fi
|
fi
|
||||||
|
if [ "$KEEP_DIRLINKS" == "yes" ]
|
||||||
|
then
|
||||||
|
RSYNC_ARGS=$RSYNC_ARGS" -K"
|
||||||
|
fi
|
||||||
if [ "$PRESERVE_HARDLINKS" == "yes" ]
|
if [ "$PRESERVE_HARDLINKS" == "yes" ]
|
||||||
then
|
then
|
||||||
RSYNC_ARGS=$RSYNC_ARGS" -H"
|
RSYNC_ARGS=$RSYNC_ARGS" -H"
|
||||||
|
@ -1907,10 +1911,11 @@ function SyncOnChanges
|
||||||
cmd="bash $osync_cmd $opts --no-locks"
|
cmd="bash $osync_cmd $opts --no-locks"
|
||||||
fi
|
fi
|
||||||
eval $cmd
|
eval $cmd
|
||||||
if [ $? != 0 ]
|
retval = $?
|
||||||
|
if [ $retval != 0 ]
|
||||||
then
|
then
|
||||||
LogError "osync child exited with error."
|
LogError "osync child exited with error."
|
||||||
exit 1
|
exit $retval
|
||||||
fi
|
fi
|
||||||
|
|
||||||
Log "#### Monitoring now."
|
Log "#### Monitoring now."
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
###### Osync - Rsync based two way sync engine with fault tolerance
|
###### Osync - Rsync based two way sync engine with fault tolerance
|
||||||
###### (L) 2013-2014 by Orsiris "Ozy" de Jong (www.netpower.fr)
|
###### (L) 2013-2014 by Orsiris "Ozy" de Jong (www.netpower.fr)
|
||||||
###### Config file rev 2705201402
|
###### Config file rev 2705201403
|
||||||
|
|
||||||
## ---------- GENERAL OPTIONS
|
## ---------- GENERAL OPTIONS
|
||||||
|
|
||||||
|
@ -69,7 +69,9 @@ PRESERVE_ACL=no
|
||||||
## Preserve Xattr. Make sure source and target FS can manage same Xattrs or you'll get loads of errors.
|
## Preserve Xattr. Make sure source and target FS can manage same Xattrs or you'll get loads of errors.
|
||||||
PRESERVE_XATTR=no
|
PRESERVE_XATTR=no
|
||||||
## Transforms symlinks into referent files/dirs
|
## Transforms symlinks into referent files/dirs
|
||||||
COPY_SYMLINKS=no
|
COPY_SYMLINKS=yes
|
||||||
|
## Treat symlinked dirs as dirs. CAUTION: This also follows symlinks outside of the replica root.
|
||||||
|
KEEP_DIRLINKS=yes
|
||||||
## Preserve hard links. Make sure source and target FS can manage hard links or you will lose them.
|
## Preserve hard links. Make sure source and target FS can manage hard links or you will lose them.
|
||||||
PRESERVE_HARDLINKS=no
|
PRESERVE_HARDLINKS=no
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue