diff --git a/CHANGELOG.md b/CHANGELOG.md index 0295bb9..f16d469 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ UNDER WORK CHANGELOG --------- +- Prevent creation of backup-id less log file when DEBUG is set - WARNING: Default behavior is now to copy the referrent files and directories from symlinks (this can reach files outside the backup root) - Recursive directory search now includes symlinks (find -L option. -type d cannot be replaced by -xtype d because of portability issues with BSD) - Dry mode does not create target directories anymore diff --git a/README.md b/README.md index 3d10559..c3c753c 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,12 @@ Currently, Obackup also runs on FreeBSD and Windows MSYS environment, altough it Feel free to drop me a mail for limited support in my free time. +## Warning + +Starting with Obackup 1.84RC4, the default behavior is modified. +Obackup now follows symlinks and treats them as the referent files / dirs, following symlinks even outside the backup root, which IMHO is more secure in terms of backups. +You may disable this behavior in the config file. + ## Installation You can download the latest obackup script from authors website. diff --git a/obackup.sh b/obackup.sh index 2865f62..a9cc2b2 100755 --- a/obackup.sh +++ b/obackup.sh @@ -4,8 +4,8 @@ ###### (L) 2013 by Orsiris "Ozy" de Jong (www.netpower.fr) AUTHOR="(L) 2013-2014 by Orsiris \"Ozy\" de Jong" CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr" -PROGRAM_VERSION=1.84preRC4 -PROGRAM_BUILD=2711201404 +PROGRAM_VERSION=1.84RC4 +PROGRAM_BUILD=2811201401 ## 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 @@ -1197,18 +1197,6 @@ function Init trap 'TrapError ${LINENO} $?' ERR fi - if [ "$LOGFILE" == "" ] - then - if [ -w /var/log ] - then - LOG_FILE=/var/log/obackup_$BACKUP_ID.log - else - LOG_FILE=./obackup_$BACKUP_ID.log - fi - else - LOG_FILE="$LOGFILE" - fi - MAIL_ALERT_MSG="Warning: Execution of obackup instance $BACKUP_ID (pid $SCRIPT_PID) as $LOCAL_USER@$LOCAL_HOST produced errors on $(date)." ## Set SSH command @@ -1486,8 +1474,6 @@ do esac done -GetLocalOS -InitLocalOSSettings CheckEnvironment if [ $? == 0 ] then @@ -1496,6 +1482,21 @@ then LoadConfigFile $1 if [ $? == 0 ] then + if [ "$LOGFILE" == "" ] + then + if [ -w /var/log ] + then + LOG_FILE=/var/log/obackup_$BACKUP_ID.log + else + LOG_FILE=./obackup_$BACKUP_ID.log + fi + else + LOG_FILE="$LOGFILE" + fi + + GetLocalOS + InitLocalOSSettings + Init GetRemoteOS InitRemoteOSSettings