From 63040f8a67e960eb4589989ad974edfb313660fa Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Wed, 2 Dec 2015 10:01:53 +0000 Subject: Added the ability to use the same rsync_flags as byteback-backup This allows the user to specify --xattrs --acl --hard-links etc. --- bin/byteback-restore | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'bin/byteback-restore') diff --git a/bin/byteback-restore b/bin/byteback-restore index 6afb1c2..68d3309 100755 --- a/bin/byteback-restore +++ b/bin/byteback-restore @@ -55,7 +55,7 @@ def restore_files(paths, snapshot) # # Basic args # - args = %w(rsync --archive --acls --numeric-ids --inplace --relative --xattrs --compress --no-implied-dirs) + args = %w(rsync --archive --numeric-ids --inplace --relative --compress) # # Add on the I/O-timeout @@ -64,6 +64,14 @@ def restore_files(paths, snapshot) args += ['--rsh', "ssh -o BatchMode=yes -x -a -i #{@ssh_key} -l #{@destination_user}"] args << '--verbose' if @verbose args += ['--rsync-path', "byteback-restore --fake-super --snapshot #{snapshot}"] + + # + # 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 + dst = "#{@destination_user}@#{@destination_host}:" paths.each do |path| -- cgit v1.2.3