From 243ac8f4ac3c73cdf2f756ca239218fd0f3ab2bd Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 22 Nov 2016 09:48:52 +0100 Subject: backup verwendet jetzt Pruefsummen --- backup.in | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/backup.in b/backup.in index b8da82f..012618c 100755 --- a/backup.in +++ b/backup.in @@ -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} -- cgit v1.2.3-54-g00ecf