Create temp dir for SQLdump
This commit is contained in:
parent
de327e663b
commit
92672acc7d
10
backup.sh
10
backup.sh
@ -87,6 +87,7 @@ unset logFileNormal
|
|||||||
unset logFileVerbose
|
unset logFileVerbose
|
||||||
unset borgCreateParams
|
unset borgCreateParams
|
||||||
unset borgPruneParams
|
unset borgPruneParams
|
||||||
|
unset sqlDumpDir
|
||||||
errorExplain=()
|
errorExplain=()
|
||||||
|
|
||||||
|
|
||||||
@ -131,11 +132,6 @@ if [ $(id -u) -ne 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
### Check for mandatory parameters
|
|
||||||
if [ -z "$sqlDumpDir" ] || [[ "$sqlDumpDir" == -* ]]; then
|
|
||||||
quit 101
|
|
||||||
fi
|
|
||||||
|
|
||||||
### Set logging verbosity based on invocation parameters
|
### Set logging verbosity based on invocation parameters
|
||||||
if [ "$logLevel" = "normal" ]; then
|
if [ "$logLevel" = "normal" ]; then
|
||||||
borgCreateParams='--stats'
|
borgCreateParams='--stats'
|
||||||
@ -158,6 +154,10 @@ echo -e "${bold}${stamp}-- Start $scriptName execution ---" >> "$logFile"
|
|||||||
export logFile="$logFile"
|
export logFile="$logFile"
|
||||||
|
|
||||||
|
|
||||||
|
### Create sqlDump temporary directory
|
||||||
|
sqlDumpDir=$( mktemp -d )
|
||||||
|
echo -e "${cyan}${stamp} Created temp dir for SQLdump: $sqlDumpDir" \
|
||||||
|
>> "$logFileVerbose"
|
||||||
|
|
||||||
|
|
||||||
# This code should not be executed since the 'quit' function should terminate
|
# This code should not be executed since the 'quit' function should terminate
|
||||||
|
Loading…
Reference in New Issue
Block a user