mirror of
https://github.com/deajan/obackup.git
synced 2025-05-11 20:53:40 +02:00
Added more preserve configurable options
This commit is contained in:
parent
2d49c957de
commit
179f274147
@ -10,6 +10,8 @@ CHANGELOG
|
|||||||
|
|
||||||
README: FreeBSD execution needs mailer (not found), sudo missing, bash needed, sed missing (see if StripQuotes mandatory)
|
README: FreeBSD execution needs mailer (not found), sudo missing, bash needed, sed missing (see if StripQuotes mandatory)
|
||||||
|
|
||||||
|
! update doc on sudoers paths
|
||||||
|
- Added options to ignore permissions, ownership and groups
|
||||||
- Improved batch runner
|
- Improved batch runner
|
||||||
- Batch runner works for directories and direct paths
|
- Batch runner works for directories and direct paths
|
||||||
- Fixed batch runner does not rerun obackup on warnings only
|
- Fixed batch runner does not rerun obackup on warnings only
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
###### obackup - Local or Remote, push or pull backup script for files & mysql databases
|
###### obackup - Local or Remote, push or pull backup script for files & mysql databases
|
||||||
###### (C) 2013-2016 by Orsiris de Jong (www.netpower.fr)
|
###### (C) 2013-2016 by Orsiris de Jong (www.netpower.fr)
|
||||||
###### obackup v2.1x config file rev 2016081601
|
###### obackup v2.1x config file rev 2016081701
|
||||||
|
|
||||||
###### GENERAL BACKUP OPTIONS
|
###### GENERAL BACKUP OPTIONS
|
||||||
|
|
||||||
@ -125,6 +125,13 @@ RSYNC_EXCLUDE_FROM=""
|
|||||||
## List separator char. You may set an alternative separator char for your directories lists above.
|
## List separator char. You may set an alternative separator char for your directories lists above.
|
||||||
PATH_SEPARATOR_CHAR=";"
|
PATH_SEPARATOR_CHAR=";"
|
||||||
|
|
||||||
|
## Preserve basic linux permissions
|
||||||
|
PRESERVE_PERMISSIONS=yes
|
||||||
|
PRESERVE_OWNER=yes
|
||||||
|
PRESERVE_GROUP=yes
|
||||||
|
## On MACOS X, does not work and will be ignored
|
||||||
|
PRESERVE_EXECUTABILITY=yes
|
||||||
|
|
||||||
## Preserve ACLS. Make sure source and target FS can hold same ACLs or you'll get loads of errors.
|
## Preserve ACLS. Make sure source and target FS can hold same ACLs or you'll get loads of errors.
|
||||||
PRESERVE_ACL=no
|
PRESERVE_ACL=no
|
||||||
## Preserve Xattr. MAke sure source and target FS can hold same Xattr or you'll get loads of errors.
|
## Preserve Xattr. MAke sure source and target FS can hold same Xattr or you'll get loads of errors.
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
PROGRAM="obackup config file upgrade script"
|
PROGRAM="obackup config file upgrade script"
|
||||||
SUBPROGRAM="obackup"
|
SUBPROGRAM="obackup"
|
||||||
AUTHOR="(C) 2015 by Orsiris \"Ozy\" de Jong"
|
AUTHOR="(C) 2016 by Orsiris de Jong"
|
||||||
CONTACT="http://www.netpower.fr/obacup - ozy@netpower.fr"
|
CONTACT="http://www.netpower.fr/obacup - ozy@netpower.fr"
|
||||||
OLD_PROGRAM_VERSION="v1.x"
|
OLD_PROGRAM_VERSION="v1.x"
|
||||||
NEW_PROGRAM_VERSION="v2.x"
|
NEW_PROGRAM_VERSION="v2.1x"
|
||||||
PROGRAM_BUILD=2016041201
|
PROGRAM_BUILD=20160817.1
|
||||||
|
|
||||||
## type -p does not work on platforms other than linux (bash). If if does not work, always as$
|
## type -p does not work on platforms other than linux (bash). If if does not work, always as$
|
||||||
if ! type "$BASH" > /dev/null; then
|
if ! type "$BASH" > /dev/null; then
|
||||||
@ -160,8 +160,20 @@ function RewriteConfigFiles {
|
|||||||
sed -i'.tmp' '/^RSYNC_EXCLUDE_PATTERN=*/a\'$'\n''RSYNC_INCLUDE_PATTERN=""\'$'\n''' "$config_file"
|
sed -i'.tmp' '/^RSYNC_EXCLUDE_PATTERN=*/a\'$'\n''RSYNC_INCLUDE_PATTERN=""\'$'\n''' "$config_file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep "^RSYNC_INCLUDE_FROM=" "$config_file" > /dev/null; then
|
if ! grep "^PRESERVE_PERMISSIONS=" "$config_file" > /dev/null; then
|
||||||
sed -i'.tmp' '/^RSYNC_EXCLUDE_FROM=*/a\'$'\n''RSYNC_INCLUDE_FROM=""\'$'\n''' "$config_file"
|
sed -i'.tmp' '/^PATH_SEPARATOR_CHAR=*/a\'$'\n''PRESERVE_PERMISSIONS=yes\'$'\n''' "$config_file"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! grep "^PRESERVE_OWNER=" "$config_file" > /dev/null; then
|
||||||
|
sed -i'.tmp' '/^PRESERVE_PERMISSIONS=*/a\'$'\n''PRESERVE_OWNER=yes\'$'\n''' "$config_file"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! grep "^PRESERVE_GROUP=" "$config_file" > /dev/null; then
|
||||||
|
sed -i'.tmp' '/^PRESERVE_OWNER=*/a\'$'\n''PRESERVE_GROUP=yes\'$'\n''' "$config_file"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! grep "^PRESERVE_EXECUTABILITY=" "$config_file" > /dev/null; then
|
||||||
|
sed -i'.tmp' '/^PRESERVE_GROUP=*/a\'$'\n''PRESERVE_EXECUTABILITY=yes\'$'\n''' "$config_file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep "^PARTIAL=" "$config_file" > /dev/null; then
|
if ! grep "^PARTIAL=" "$config_file" > /dev/null; then
|
||||||
|
Loading…
Reference in New Issue
Block a user