Added initial preserve permissions

pull/60/head
deajan 8 years ago
parent 7f7e6ae5a4
commit 1472fba4bc

@ -7,6 +7,8 @@ KNOWN ISSUES
RECENT CHANGES
--------------
- Added options to ignore permissions, ownership and groups
- Refactored WaitFor... functions into one
- Improved execution speed
- Added parallel execution for most secondary fuctions
- Lowered sleep time in wait functions

@ -1,6 +1,6 @@
#### MINIMAL-FUNCTION-SET BEGIN ####
## FUNC_BUILD=2016080806
## FUNC_BUILD=2016080901
## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
#TODO: set _LOGGER_PREFIX in other apps, specially for osync daemon mode
@ -1148,7 +1148,6 @@ function PreInit {
## Set rsync default arguments
RSYNC_ARGS="-rltD"
RSYNC_ATTR_ARGS="-pgo"
if [ "$_DRYRUN" -eq 1 ]; then
RSYNC_DRY_ARG="-n"
DRY_WARNING="/!\ DRY RUN"
@ -1156,6 +1155,16 @@ function PreInit {
RSYNC_DRY_ARG=""
fi
RSYNC_ATTR_ARGS=""
if [ "$PRESERVE_PERMISSIONS" != "no" ]; then
RSYNC_ATTR_ARGS=$RSYNC_ATTR_ARGS" -p"
fi
if [ "$PRESERVE_OWNER" != "no" ]; then
RSYNC_ATTR_ARGS=$RSYNC_ATTR_ARGS" -o"
fi
if [ "$PRESERVE_GROUP" != "no" ]; then
RSYNC_ATTR_ARGS=$RSYNC_ATTR_ARGS" -g"
if [ "$PRESERVE_ACL" == "yes" ]; then
RSYNC_ATTR_ARGS=$RSYNC_ATTR_ARGS" -A"
fi

@ -2,7 +2,7 @@
###### osync - Rsync based two way sync engine with fault tolerance
###### (C) 2013-2016 by Orsiris de Jong (www.netpower.fr)
###### osync v1.1x / v1.2x config file rev 2016080301
###### osync v1.1x / v1.2x config file rev 2016080901
## ---------- GENERAL OPTIONS
@ -76,6 +76,10 @@ REMOTE_3RD_PARTY_HOSTS="www.kernel.org www.google.com"
## ---------- MISC OPTIONS
## Preserve basic linux permissions
PRESERVE_PERMISSIONS=yes
PRESERVE_OWNER=yes
PRESERVE_GROUP=yes
## Preserve ACLS. Make sure source and target FS can manage same ACLs or you'll get loads of errors.
PRESERVE_ACL=no
## Preserve Xattr. Make sure source and target FS can manage same Xattrs or you'll get loads of errors.

Loading…
Cancel
Save