From 3758ee8660246450d19b88147c64901b833333ee Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Sun, 1 Feb 2015 22:12:35 +0000 Subject: Moved added rsync options file so xattrs etc can be specified in there --- byteback-backup | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/byteback-backup b/byteback-backup index 3b6a040..cbf6f7b 100755 --- a/byteback-backup +++ b/byteback-backup @@ -190,8 +190,7 @@ def rsync(*sources) # given filesystem, daily backups (with this tool) are out of the question. # args = %w( rsync --archive --numeric-ids --delete-delay --inplace --relative --timeout 43200 ) - args += [ "--xattrs", "--hard-links", "--acls" ] - args += [ "--rsync-path", "rsync --fake-super"] + args += [ "--rsh", "ssh -o BatchMode=yes -x -a -i #{@ssh_key} -l #{@destination_user}"] args << "--verbose" if @verbose args += @excludes.map { |x| ["--exclude", x] }.flatten @@ -210,6 +209,15 @@ def rsync(*sources) args += ["--filter", "merge /etc/byteback/rsync_filter"] end + # + # To add extra rsync flags, a file can be used. This can have flags all on one line, or one per line. + # + if File.exists?("/etc/byteback/rsync_flags") + args += File.readlines("/etc/byteback/rsync_flags").map(&:chomp) + end + + args += [ "--rsync-path", "rsync --fake-super"] + args += sources args << @destination -- cgit v1.2.1