adding append/append_verify

This commit is contained in:
Axel Kittenberger 2016-12-05 15:47:12 +01:00
parent 2ff9ae72be
commit db488a86ac
2 changed files with 26 additions and 6 deletions

View File

@ -1,5 +1,7 @@
??-??-????: ??-??-????:
enhancement: add rsync options: enhancement: add rsync options:
"append",
"append-verify",
"chmod", "chmod",
"chown", "chown",
"copy_dirlinks", "copy_dirlinks",

View File

@ -53,6 +53,8 @@ rsync.checkgauge = {
rsync = { rsync = {
acls = true, acls = true,
append = true,
append_verify = true,
archive = true, archive = true,
binary = true, binary = true,
bwlimit = true, bwlimit = true,
@ -239,20 +241,24 @@ rsync.init = function(event)
local delete = nil local delete = nil
local target = config.target local target = config.target
if not target then if not target
if not config.host then then
if not config.host
then
error('Internal fail, Neither target nor host is configured') error('Internal fail, Neither target nor host is configured')
end end
target = config.host .. ':' .. config.targetdir target = config.host .. ':' .. config.targetdir
end end
if config.delete == true or config.delete == 'startup' then if config.delete == true or config.delete == 'startup'
then
delete = { '--delete', '--ignore-errors' } delete = { '--delete', '--ignore-errors' }
end end
if #excludes == 0 then if #excludes == 0
-- start rsync without any excludes then
-- starts rsync without any excludes
log( log(
'Normal', 'Normal',
'recursive startup rsync: ', 'recursive startup rsync: ',
@ -272,7 +278,7 @@ rsync.init = function(event)
) )
else else
-- start rsync providing an exclude list -- starts rsync providing an exclusion list
-- on stdin -- on stdin
local exS = table.concat( excludes, '\n' ) local exS = table.concat( excludes, '\n' )
@ -488,6 +494,18 @@ rsync.prepare =
end end
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 if crsync.bwlimit
then then
computed[ computedN ] = '--bwlimit=' .. crsync.bwlimit computed[ computedN ] = '--bwlimit=' .. crsync.bwlimit