diff options
Diffstat (limited to 'byteback-backup')
-rwxr-xr-x | byteback-backup | 12 |
1 files 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 |