mirror of
https://gitlab.com/octospacc/Configs.git
synced 2025-06-05 21:59:36 +02:00
Backup Scripts
This commit is contained in:
@ -21,3 +21,7 @@ ccencryptNow() {
|
||||
BaseKey="$2"
|
||||
ccrypt -e -f -K"$(Hash2 "${BaseKey}" "${RunDate}")" "${File}"
|
||||
}
|
||||
|
||||
WriteLastLog() {
|
||||
echo "$0: $(date)" > "${BackupsBase}/Last.log"
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -41,4 +41,4 @@ SimpleBackup "FreshRSS-data"
|
||||
# cd ..
|
||||
#done
|
||||
|
||||
date > "${BackupsBase}/Last.log"
|
||||
WriteLastLog
|
||||
|
Reference in New Issue
Block a user