diff options
author | Erich Eckner <git@eckner.net> | 2016-11-22 09:48:52 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-11-22 09:48:52 +0100 |
commit | 243ac8f4ac3c73cdf2f756ca239218fd0f3ab2bd (patch) | |
tree | 912c511f51d37c5b97ece223c9675d12eeccd1c2 /backup.in | |
parent | 5fabe114b02c76cd5dc30d7555a381ed339f1cba (diff) | |
download | hardlinkedBackups-243ac8f4ac3c73cdf2f756ca239218fd0f3ab2bd.tar.xz |
backup verwendet jetzt Pruefsummen
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} |