From 27a98fb54beb47bfd56af363de1b27581b972b6e Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Sun, 12 Jan 2014 03:09:12 +0800 Subject: [PATCH] Added TODO to README.md --- README.md | 2 ++ rsync_tmbackup.sh | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ba5ee89..fe76560 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,8 @@ An optional exclude file can be provided as a third parameter. It should be comp # TODO +* Check source and destination file-system. If one of them is FAT, use the --modify-window rsync parameter (see `man rsync`) with a value of 1 or 2. + * Minor changes (see TODO comments in the source). * Backup to remote drive? diff --git a/rsync_tmbackup.sh b/rsync_tmbackup.sh index a467755..7a1f355 100755 --- a/rsync_tmbackup.sh +++ b/rsync_tmbackup.sh @@ -29,6 +29,7 @@ fn_parse_date() { # Converts YYYY-MM-DD-HHMMSS to YYYY-MM-DD HH:MM:SS and then to Unix Epoch. case "$OSTYPE" in linux*) date -d "${1:0:10} ${1:11:2}:${1:13:2}:${1:15:2}" +%s ;; + cygwin*) date -d "${1:0:10} ${1:11:2}:${1:13:2}:${1:15:2}" +%s ;; darwin*) date -j -f "%Y-%m-%d-%H%M%S" "$1" "+%s" ;; esac } @@ -46,7 +47,7 @@ fn_expire_backup() { fi fn_log_info "Expiring $1" - rm -rf -- "$1" + # rm -rf -- "$1" } # ----------------------------------------------------------------------------- @@ -239,6 +240,7 @@ while : ; do # ----------------------------------------------------------------------------- # Check whether rsync reported any errors # ----------------------------------------------------------------------------- + if [ -n "$(grep "rsync:" "$LOG_FILE")" ]; then fn_log_warn "Rsync reported a warning, please check '$LOG_FILE' for more details." fi