summaryrefslogtreecommitdiff
path: root/backup.in
diff options
context:
space:
mode:
Diffstat (limited to 'backup.in')
-rwxr-xr-xbackup.in15
1 files changed, 8 insertions, 7 deletions
diff --git a/backup.in b/backup.in
index 3264370..73ee711 100755
--- a/backup.in
+++ b/backup.in
@@ -108,18 +108,18 @@ do
excludeArgs="${excludeArgs} --exclude ${toExclude}"
done
-if [ ! -e ${neues} ]
+if [ ! -e ${neues}/wip ]
then
- mkdir ${neues}
+ mkdir -p ${neues}/wip
fi
-chmod 750 ${neues}
-chown root:root ${neues}
+chmod 750 ${neues}{,/wip}
+chown root:root ${neues}{,/wip}
if [ -z "${rsyncShell}" ]
then
rsync ${rsyncOptions} \
${linkdests} \
${excludeArgs} \
- ${Quelle} ${neues}/
+ ${Quelle} ${neues}/wip/
sleep 1
rsync ${Quelle}
else
@@ -127,7 +127,7 @@ else
${rsyncOptions} \
${linkdests} \
${excludeArgs} \
- ${Quelle} ${neues}/
+ ${Quelle} ${neues}/wip/
sleep 1
rsync "${rsyncShell}" ${Quelle}
fi
@@ -137,7 +137,8 @@ erg=$?
if [ ${erg} -eq 0 ] || [ ${erg} -eq 24 ]
then
- mv ${neues} ${neues_Datum}
+ mv ${neues}/wip ${neues_Datum}
+ rmdir ${neues}
rm ${pidFile}
else
rm ${pidFile}