diff --git a/CHANGELOG.md b/CHANGELOG.md index 67f951c..a337af1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,8 @@ UNDER WORK RECENT CHANGES -------------- +- Added optional checksum parameter for the paranoid :) +- Fixed typo in soft deletion code preventing logging slave deleted backup files - Removed legacy lockfile code from init script - Removed hardcoded program name from init script - 01 Avr. 2015: Osync v1.00pre diff --git a/osync.sh b/osync.sh index e1def91..f90a8d1 100755 --- a/osync.sh +++ b/osync.sh @@ -4,7 +4,7 @@ PROGRAM="Osync" # Rsync based two way sync engine with fault tolerance AUTHOR="(L) 2013-2015 by Orsiris \"Ozy\" de Jong" CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr" PROGRAM_VERSION=1.00pre -PROGRAM_BUILD=0104201503 +PROGRAM_BUILD=1304201501 ## 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 @@ -1603,7 +1603,7 @@ function _SoftDelete $FIND_CMD "$3/" -type f -ctime +$1 -print0 | xargs -0 -I {} echo "Will delete file {}" > $RUN_DIR/osync_soft_delete_slave_$SCRIPT_PID Log "Command output:\n$(cat $RUN_DIR/osync_soft_delete_slave_$SCRIPT_PID)" $FIND_CMD "$3/" -type d -empty -ctime +$1 -print0 | xargs -0 -I {} echo "Will delete directory {}" > $RUN_DIR/osync_soft_delete_slave_$SCRIPT_PID - Log "Command output:\n$(cat $RUN_DIR/osync_conflict_backup_slave_$SCRIPT_PID)" + Log "Command output:\n$(cat $RUN_DIR/osync_soft_delete_slave_$SCRIPT_PID)" Dummy & fi if [ $dryrun -ne 1 ] @@ -1771,6 +1771,10 @@ function Init then RSYNC_ARGS=$RSYNC_ARGS" -H" fi + if [ "$CHECKSUM" == "yes" ] + then + RSYNC_ARGS=$RSYNC_ARGS" --checksum" + fi if [ $dryrun -eq 1 ] then RSYNC_ARGS=$RSYNC_ARGS" -n" diff --git a/sync.conf b/sync.conf index 2957a21..baabfd9 100755 --- a/sync.conf +++ b/sync.conf @@ -2,7 +2,7 @@ ###### Osync - Rsync based two way sync engine with fault tolerance ###### (L) 2013-2014 by Orsiris "Ozy" de Jong (www.netpower.fr) -###### Config file rev 3003201501 +###### Config file rev 1304201501 ## ---------- GENERAL OPTIONS @@ -76,6 +76,8 @@ COPY_SYMLINKS=no KEEP_DIRLINKS=no ## Preserve hard links. Make sure source and target FS can manage hard links or you will lose them. PRESERVE_HARDLINKS=no +## Do a full checksum on all files that have identical sizes, they are checksummed to see if they actually are identical. This can take a long time. +CHECKSUM=no ## Let RSYNC compress file transfers. Do not use this if both master and slave replicas are on local system. Also, do not use this if you already enabled SSH compression. RSYNC_COMPRESS=yes