mirror of
https://gitlab.com/octospacc/Configs.git
synced 2025-04-18 19:37:36 +02:00
Fix scripts, add missing
This commit is contained in:
parent
8e036f308c
commit
bb745d8d0d
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*.sec
|
||||||
|
.*.sec
|
@ -8,4 +8,16 @@ BackupsBase="/media/Disk/Backup"
|
|||||||
RunDate="$(date +%F)"
|
RunDate="$(date +%F)"
|
||||||
cd "${BackupsBase}"
|
cd "${BackupsBase}"
|
||||||
|
|
||||||
source ./.BackupSecrects.cfg
|
. ./.BackupSecrects.sec
|
||||||
|
|
||||||
|
Hash2() {
|
||||||
|
BaseKey="$1"
|
||||||
|
SecStr="$2"
|
||||||
|
echo "$(echo "${BaseKey}$(echo "${SecStr}" | sha512sum | base64 -w0)" | sha512sum | base64 -w0)"
|
||||||
|
}
|
||||||
|
|
||||||
|
ccencryptNow() {
|
||||||
|
File="$1"
|
||||||
|
BaseKey="$2"
|
||||||
|
ccrypt -e -K"$(Hash2 "${BaseKey}" "${RunDate}")" "${File}"
|
||||||
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Upload a backup of the Local Cloud and of local services backups to other clouds
|
# Upload a backup of the Local Cloud and of local services backups to other clouds
|
||||||
|
|
||||||
source ./BackupGlobals.cfg
|
. "$(dirname "$(realpath "$0")")/BackupGlobals.cfg"
|
||||||
|
|
||||||
GitPush() {
|
GitPush() {
|
||||||
git add .
|
git add .
|
||||||
@ -9,7 +9,13 @@ GitPush() {
|
|||||||
git push
|
git push
|
||||||
}
|
}
|
||||||
|
|
||||||
#Server-Backup-Limited
|
cd ./Server-Backup-Limited
|
||||||
|
#mkdir -p ./tmp && cd ./tmp
|
||||||
|
Item="Invidious-User" && cp "../../${Item}/Latest.7z" "./${Item}.7z" && ccencryptNow "./${Item}.7z" "${BackupKey_Git_Invidious}"
|
||||||
|
Item="wallabag-data" && cp "../../${Item}/Latest.tar.xz" "./${Item}.tar.xz" && ccencryptNow "./${Item}.tar.xz" "${BackupKey_Git_wallabag}"
|
||||||
|
Item="FreshRSS-data" && cp "../../${Item}/Latest.tar.xz" "./${Item}.tar.xz" && ccencryptNow "./${Item}.tar.xz" "${BackupKey_Git_FreshRSS}"
|
||||||
|
GitPush
|
||||||
|
cd ..
|
||||||
|
|
||||||
#CloudDir="/home/octo/Cloud"
|
#CloudDir="/home/octo/Cloud"
|
||||||
#cd "$CloudDir"
|
#cd "$CloudDir"
|
||||||
|
14
Server/Scripts/Backup/ExternalDataBackup.sh
Executable file
14
Server/Scripts/Backup/ExternalDataBackup.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Make local backups of our data from various third-party services
|
||||||
|
|
||||||
|
. "$(dirname "$(realpath "$0")")/BackupGlobals.cfg"
|
||||||
|
|
||||||
|
# Invidious personal JSON dump
|
||||||
|
Name="Invidious-User"
|
||||||
|
mkdir -p "./${Name}"
|
||||||
|
curl \
|
||||||
|
"${Invidious_Backup_URL}/subscription_manager?action_takeout=1&format=json" \
|
||||||
|
-H "${Invidious_Backup_Cookie}" \
|
||||||
|
| 7z a -mmt1 -mx9 "./${Name}/${RunDate}.7z" -si && cp "./${Name}/${RunDate}.7z" "./${Name}/Latest.7z"
|
||||||
|
|
||||||
|
date > "${BackupsBase}/Last.log"
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Make local backups of the data from the hosted services
|
# Make local backups of the data from the hosted services
|
||||||
|
|
||||||
source ./BackupGlobals.cfg
|
. "$(dirname "$(realpath "$0")")/BackupGlobals.cfg"
|
||||||
|
|
||||||
SimpleBackup() {
|
SimpleBackup() {
|
||||||
mkdir -p "./$1"
|
mkdir -p "./$1"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user