summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbackup.in19
1 files 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}