Backup Scripts

This commit is contained in:
2023-01-31 09:48:04 +01:00
parent e72ce34734
commit 9b6e4b4c4c
6 changed files with 30 additions and 12 deletions

View File

@ -21,3 +21,7 @@ ccencryptNow() {
BaseKey="$2"
ccrypt -e -f -K"$(Hash2 "${BaseKey}" "${RunDate}")" "${File}"
}
WriteLastLog() {
echo "$0: $(date)" > "${BackupsBase}/Last.log"
}

View File

@ -4,9 +4,14 @@
. "$(dirname "$(realpath "$0")")/BackupGlobals.cfg"
GitPush() {
git add .
git commit -m "Auto-Backup $(date) (${RunDate})"
git push
Msg="Auto-Backup $(date) (${RunDate})"
git add . && git commit -m "${Msg}" && git push
}
GitPullPushPath() {
BackPath="$(pwd)"
cd "$1" && git pull && GitPush
cd "${BackPath}"
}
cd ./Server-Backup-Limited
@ -16,6 +21,8 @@ Item="FreshRSS-data" && cp "../${Item}/Latest.tar.xz" "./${Item}.tar.xz" && ccen
GitPush
cd ..
#GitPullPushPath "./Personal-Game-Saves"
#CloudDir="/home/octo/Cloud"
#cd "$CloudDir"
@ -51,4 +58,4 @@ cd ..
#done
#GitPush
date > "${BackupsBase}/Last.log"
WriteLastLog

View File

@ -11,4 +11,4 @@ curl \
-H "${Invidious_Backup_Cookie}" \
| 7z a -mmt1 -mx9 "./${Name}/${RunDate}.7z" -si && cp "./${Name}/${RunDate}.7z" "./${Name}/Latest.7z"
date > "${BackupsBase}/Last.log"
WriteLastLog

View File

@ -41,4 +41,4 @@ SimpleBackup "FreshRSS-data"
# cd ..
#done
date > "${BackupsBase}/Last.log"
WriteLastLog