mirror of
https://github.com/Llewellynvdm/Backup-System.git
synced 2024-12-12 08:57:47 +00:00
better temp folder control
This commit is contained in:
parent
8e59f87023
commit
4d992b06fa
6
incl.sh
6
incl.sh
@ -75,6 +75,8 @@ function moveDB () {
|
||||
}
|
||||
|
||||
function moveWEB () {
|
||||
# we move to tmp folder
|
||||
cd "$tmpFolder"
|
||||
# local folder path
|
||||
localFolder="$1"
|
||||
# remote folder name
|
||||
@ -94,9 +96,9 @@ function moveWEB () {
|
||||
FILE="$2.zip"
|
||||
fi
|
||||
# zip the website
|
||||
zip -r -q "${localFolder}${FILE}" "${localFolder}"
|
||||
zip -r -q "${FILE}" "${localFolder}"
|
||||
# set the paths
|
||||
PaTh="${localFolder}${FILE}"
|
||||
PaTh="${FILE}"
|
||||
remotePaTh="${REMOTEWEBPATH}${FILE}"
|
||||
else
|
||||
# set the paths
|
||||
|
5
main.sh
5
main.sh
@ -25,6 +25,8 @@ function main () {
|
||||
backupDB &
|
||||
# backup the websites now
|
||||
backupWEB
|
||||
# now remove the local file
|
||||
rmTmpFolder "$tmpFolder"
|
||||
}
|
||||
|
||||
# function to backup all DB's
|
||||
@ -37,9 +39,6 @@ function backupDB () {
|
||||
# move to backup server
|
||||
moveDB "$DBFILE"
|
||||
done < $databaseBuilder
|
||||
|
||||
# now remove the local file
|
||||
rmTmpFolder "$tmpFolder"
|
||||
|
||||
# start fresh
|
||||
cd "$USERHOME"
|
||||
|
Loading…
Reference in New Issue
Block a user