pre-req: seafile data dir
This commit is contained in:
parent
1bd6ff7856
commit
f854e31fd6
12
backup.sh
12
backup.sh
@ -439,7 +439,7 @@ fi
|
|||||||
checkExist ff "$borgDetails"
|
checkExist ff "$borgDetails"
|
||||||
checkResult="$?"
|
checkResult="$?"
|
||||||
if [ "$checkResult" = "1" ]; then
|
if [ "$checkResult" = "1" ]; then
|
||||||
# sqlDetails file cannot be found
|
# borgDetails file cannot be found
|
||||||
echo -e "\n${err}The file containing your borgbackup details does not" \
|
echo -e "\n${err}The file containing your borgbackup details does not" \
|
||||||
"exist (-b parameter)${normal}\n"
|
"exist (-b parameter)${normal}\n"
|
||||||
exit 1
|
exit 1
|
||||||
@ -447,13 +447,13 @@ fi
|
|||||||
|
|
||||||
## Check Seafile data directory
|
## Check Seafile data directory
|
||||||
# Ensure Seafile data directory is provided
|
# Ensure Seafile data directory is provided
|
||||||
if [ -z "$ncDataDir" ]; then
|
if [ -z "$dataDir" ]; then
|
||||||
echo -e "\n${err}The Seafile data directory must be specified" \
|
echo -e "\n${err}The Seafile data directory must be specified" \
|
||||||
"(-d parameter)${normal}\n"
|
"(-d parameter)${normal}\n"
|
||||||
exit 1
|
exit 1
|
||||||
# Ensure Seafile data directory exists
|
# Ensure Seafile data directory exists
|
||||||
elif [ -n "$ncDataDir" ]; then
|
else
|
||||||
checkExist fd "$ncDataDir"
|
checkExist fd "$dataDir"
|
||||||
checkResult="$?"
|
checkResult="$?"
|
||||||
if [ "$checkResult" = "1" ]; then
|
if [ "$checkResult" = "1" ]; then
|
||||||
# Specified Seafile data directory could not be found
|
# Specified Seafile data directory could not be found
|
||||||
@ -743,7 +743,7 @@ if [ -z "$borgExclude" ]; then
|
|||||||
"${normal}" >> "$logFile"
|
"${normal}" >> "$logFile"
|
||||||
borg --show-rc create ${borgCreateParams} ::`date +%Y-%m-%d_%H%M%S` \
|
borg --show-rc create ${borgCreateParams} ::`date +%Y-%m-%d_%H%M%S` \
|
||||||
"${xtraFiles[@]}" \
|
"${xtraFiles[@]}" \
|
||||||
"${sqlDumpDir}" "${ncDataDir}" \
|
"${sqlDumpDir}" "${dataDir}" \
|
||||||
2>> "$logFile"
|
2>> "$logFile"
|
||||||
else
|
else
|
||||||
# borgExclude is not empty
|
# borgExclude is not empty
|
||||||
@ -752,7 +752,7 @@ else
|
|||||||
borg --show-rc create ${borgCreateParams} --exclude-from "${borgExclude}" \
|
borg --show-rc create ${borgCreateParams} --exclude-from "${borgExclude}" \
|
||||||
::`date +%Y-%m-%d_%H%M%S` \
|
::`date +%Y-%m-%d_%H%M%S` \
|
||||||
"${xtraFiles[@]}" \
|
"${xtraFiles[@]}" \
|
||||||
"${sqlDumpDir}" "${ncDataDir}" \
|
"${sqlDumpDir}" "${dataDir}" \
|
||||||
2>> "$logFile"
|
2>> "$logFile"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user