diff --git a/ChangeLog b/ChangeLog index eafab2a..d805c77 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ ??-??-????: enhancement: add rsync options: + "append", + "append-verify", "chmod", "chown", "copy_dirlinks", diff --git a/default-rsync.lua b/default-rsync.lua index c833443..a1bcc78 100644 --- a/default-rsync.lua +++ b/default-rsync.lua @@ -53,6 +53,8 @@ rsync.checkgauge = { rsync = { acls = true, + append = true, + append_verify = true, archive = true, binary = true, bwlimit = true, @@ -239,20 +241,24 @@ rsync.init = function(event) local delete = nil local target = config.target - if not target then - if not config.host then + if not target + then + if not config.host + then error('Internal fail, Neither target nor host is configured') end target = config.host .. ':' .. config.targetdir end - if config.delete == true or config.delete == 'startup' then + if config.delete == true or config.delete == 'startup' + then delete = { '--delete', '--ignore-errors' } end - if #excludes == 0 then - -- start rsync without any excludes + if #excludes == 0 + then + -- starts rsync without any excludes log( 'Normal', 'recursive startup rsync: ', @@ -272,7 +278,7 @@ rsync.init = function(event) ) else - -- start rsync providing an exclude list + -- starts rsync providing an exclusion list -- on stdin local exS = table.concat( excludes, '\n' ) @@ -488,6 +494,18 @@ rsync.prepare = end end + if crsync.append + then + computed[ computedN ] = '--append' + computedN = computedN + 1 + end + + if crsync.append_verify + then + computed[ computedN ] = '--append-verify' + computedN = computedN + 1 + end + if crsync.bwlimit then computed[ computedN ] = '--bwlimit=' .. crsync.bwlimit