1
0
mirror of https://github.com/deajan/obackup.git synced 2024-11-15 04:03:41 +01:00

Fixed infamous recursive exclude bug

This commit is contained in:
deajan 2018-11-05 21:04:20 +01:00
parent ff9b9b632b
commit 14fc50304a

View File

@ -7,7 +7,7 @@ PROGRAM="obackup"
AUTHOR="(C) 2013-2018 by Orsiris de Jong" AUTHOR="(C) 2013-2018 by Orsiris de Jong"
CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr" CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr"
PROGRAM_VERSION=2.1-RC1 PROGRAM_VERSION=2.1-RC1
PROGRAM_BUILD=2018101001 PROGRAM_BUILD=2018110501
IS_STABLE=no IS_STABLE=no
#### Execution order #__WITH_PARANOIA_DEBUG #### Execution order #__WITH_PARANOIA_DEBUG
@ -1408,7 +1408,7 @@ function Rsync {
## Manage to backup recursive directories lists files only (not recursing into subdirectories) ## Manage to backup recursive directories lists files only (not recursing into subdirectories)
if [ $recursive == false ]; then if [ $recursive == false ]; then
# Fixes symlinks to directories in target cannot be deleted when backing up root directory without recursion # Fixes symlinks to directories in target cannot be deleted when backing up root directory without recursion
rsyncArgs="$RSYNC_DEFAULT_NONRECURSIVE_ARGS -k" rsyncArgs="$RSYNC_DEFAULT_ARGS -f '- /*/*/'"
else else
rsyncArgs="$RSYNC_DEFAULT_ARGS" rsyncArgs="$RSYNC_DEFAULT_ARGS"
fi fi
@ -1492,7 +1492,7 @@ function FilesBackup {
IFS=$PATH_SEPARATOR_CHAR read -r -a backupTasks <<< "$RECURSIVE_DIRECTORY_LIST" IFS=$PATH_SEPARATOR_CHAR read -r -a backupTasks <<< "$RECURSIVE_DIRECTORY_LIST"
for backupTask in "${backupTasks[@]}"; do for backupTask in "${backupTasks[@]}"; do
# Backup recursive directories withouht recursion # Backup recursive directories without recursion
if [ "$KEEP_ABSOLUTE_PATHS" != "no" ]; then if [ "$KEEP_ABSOLUTE_PATHS" != "no" ]; then
# Fix for backup of '/' # Fix for backup of '/'