diff options
Diffstat (limited to 'backup.in')
-rwxr-xr-x | backup.in | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -1,5 +1,10 @@ #!/bin/bash +rsyncOptions=( # common to both runs: verbose, stay-on-device, use checksums + '-vxcrlDH' # only in first run: recurse and preserve soft links, devices, hard links + '-vxcaHAX' # only in second run: "archive" and preseve hardlinks, ACLs, xattr +) + [ -r "#ETCDIR#/backup.conf" ] && \ . "#ETCDIR#/backup.conf" @@ -111,20 +116,26 @@ chmod 750 ${neues} chown erich:root ${neues} if [ -z "${rsyncShell}" ] then - rsync -rlDvx ${linkdests} \ + rsync ${rsyncOptions[0]} \ + ${linkdests} \ ${excludeArgs} \ ${Quelle} ${neues}/ sleep 1 - rsync -avx ${excludeArgs} \ + rsync ${rsyncOptions[1]} \ + ${excludeArgs} \ ${Quelle} ${neues}/ sleep 1 rsync ${Quelle} else - rsync "${rsyncShell}" -rlDvx ${linkdests} \ + rsync "${rsyncShell}" \ + ${rsyncOptions[0]} \ + ${linkdests} \ ${excludeArgs} \ ${Quelle} ${neues}/ sleep 1 - rsync "${rsyncShell}" -avx ${excludeArgs} \ + rsync "${rsyncShell}" \ + ${rsyncOptions[1]} \ + ${excludeArgs} \ ${Quelle} ${neues}/ sleep 1 rsync "${rsyncShell}" ${Quelle} |