summaryrefslogtreecommitdiff
path: root/backup.in
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-11-22 09:48:52 +0100
committerErich Eckner <git@eckner.net>2016-11-22 09:48:52 +0100
commit243ac8f4ac3c73cdf2f756ca239218fd0f3ab2bd (patch)
tree912c511f51d37c5b97ece223c9675d12eeccd1c2 /backup.in
parent5fabe114b02c76cd5dc30d7555a381ed339f1cba (diff)
downloadhardlinkedBackups-243ac8f4ac3c73cdf2f756ca239218fd0f3ab2bd.tar.xz
backup verwendet jetzt Pruefsummen
Diffstat (limited to 'backup.in')
-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}