mirror of
https://github.com/deajan/obackup.git
synced 2024-12-25 15:03:41 +01:00
Fix paths
This commit is contained in:
parent
caf8301679
commit
2ce18fb721
@ -602,6 +602,12 @@ function CreateStorageDirectories {
|
|||||||
CAN_BACKUP_FILES=false
|
CAN_BACKUP_FILES=false
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if [ "$ENCRYPTION" == "yes" ]; then
|
||||||
|
_CreateDirectoryLocal "$CRYPT_STORAGE"
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
CAN_BACKUP_FILES=false
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -708,7 +714,7 @@ function CheckDiskSpace {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ "$ENCRYPTION" != "no" ]; then
|
if [ "$ENCRYPTION" != "no" ]; then
|
||||||
GetDiskSpaceRemote "$CRYPT_STORAGE"
|
GetDiskSpaceLocal "$CRYPT_STORAGE"
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
CRYPT_DISK_SPACE=0
|
CRYPT_DISK_SPACE=0
|
||||||
CAN_BACKUP_FILES=false
|
CAN_BACKUP_FILES=false
|
||||||
@ -1132,7 +1138,6 @@ function FilesBackup {
|
|||||||
|
|
||||||
local backupTask
|
local backupTask
|
||||||
local backupTasks
|
local backupTasks
|
||||||
local path
|
|
||||||
|
|
||||||
IFS=$PATH_SEPARATOR_CHAR read -r -a backupTasks <<< "$FILE_BACKUP_TASKS"
|
IFS=$PATH_SEPARATOR_CHAR read -r -a backupTasks <<< "$FILE_BACKUP_TASKS"
|
||||||
for backupTask in "${backupTasks[@]}"; do
|
for backupTask in "${backupTasks[@]}"; do
|
||||||
@ -1147,13 +1152,7 @@ function FilesBackup {
|
|||||||
elif [ "$ENCRYPTION" == "yes" ] && [ "$BACKUP_TYPE" == "pull" ]; then
|
elif [ "$ENCRYPTION" == "yes" ] && [ "$BACKUP_TYPE" == "pull" ]; then
|
||||||
Rsync "$backupTask" true
|
Rsync "$backupTask" true
|
||||||
if [ $? == 0 ]; then
|
if [ $? == 0 ]; then
|
||||||
#TODO: Test KEEP_ABSOLUTE_PATH=no
|
EncryptFiles "$FILE_STORAGE" "$CRYPT_STORAGE" "$GPG_RECIPIENT" true false
|
||||||
if [ "$KEEP_ABSOLUTE_PATHS" != "no" ]; then
|
|
||||||
path="$FILE_STORAGE/$backupTask"
|
|
||||||
else
|
|
||||||
path="$FILE_STORAGE/$(basename "$backupTask")"
|
|
||||||
fi
|
|
||||||
EncryptFiles "$path" "$path" "$GPG_RECIPIENT" true false
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
Rsync "$backupTask" true
|
Rsync "$backupTask" true
|
||||||
@ -1174,12 +1173,7 @@ function FilesBackup {
|
|||||||
elif [ "$ENCRYPTION" == "yes" ] && [ "$BACKUP_TYPE" == "pull" ]; then
|
elif [ "$ENCRYPTION" == "yes" ] && [ "$BACKUP_TYPE" == "pull" ]; then
|
||||||
Rsync "$backupTask" false
|
Rsync "$backupTask" false
|
||||||
if [ $? == 0 ]; then
|
if [ $? == 0 ]; then
|
||||||
if [ "$KEEP_ABSOLUTE_PATH" != "no" ]; then
|
EncryptFiles "$FILE_STORAGE" "$CRYPT_STORAGE" "$GPG_RECIPIENT" false false
|
||||||
path="$FILE_STORAGE/$backupTask"
|
|
||||||
else
|
|
||||||
path="$FILE_STORAGE/$(basename "$backupTask")"
|
|
||||||
fi
|
|
||||||
EncryptFiles "$path" "$path" "$GPG_RECIPIENT" false false
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
Rsync "$backupTask" false
|
Rsync "$backupTask" false
|
||||||
@ -1201,12 +1195,7 @@ function FilesBackup {
|
|||||||
elif [ "$ENCRYPTION" == "yes" ] && [ "$BACKUP_TYPE" == "pull" ]; then
|
elif [ "$ENCRYPTION" == "yes" ] && [ "$BACKUP_TYPE" == "pull" ]; then
|
||||||
Rsync "$backupTask" true
|
Rsync "$backupTask" true
|
||||||
if [ $? == 0 ]; then
|
if [ $? == 0 ]; then
|
||||||
if [ "$KEEP_ABSOLUTE_PATH" != "no" ]; then
|
EncryptFiles "$FILE_STORAGE" "$CRYPT_STORAGE" "$GPG_RECIPIENT" true false
|
||||||
path="$FILE_STORAGE/$backupTask"
|
|
||||||
else
|
|
||||||
path="$FILE_STORAGE/$(basename "$backupTask")"
|
|
||||||
fi
|
|
||||||
EncryptFiles "$path" "$path" "$GPG_RECIPIENT" true false
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
Rsync "$backupTask" true
|
Rsync "$backupTask" true
|
||||||
|
Loading…
Reference in New Issue
Block a user