updated Nextcloud Messages
This commit is contained in:
@@ -23,7 +23,9 @@ Mesg="*** Nextcloud Data Backup ***${NEWLINE}"
|
|||||||
# --- LOGIK ---
|
# --- LOGIK ---
|
||||||
echo "Starte Synchronisation von $SOURCE_DIR nach $REMOTE_HOST auf Port $REMOTE_PORT..."
|
echo "Starte Synchronisation von $SOURCE_DIR nach $REMOTE_HOST auf Port $REMOTE_PORT..."
|
||||||
# Pfad zum SSH-Key
|
# Pfad zum SSH-Key
|
||||||
SSH_KEY="/home/DEIN_USER/.ssh/id_ed25519"
|
SSH_KEY="/root/.ssh/id_ed25519"
|
||||||
|
|
||||||
|
logfilename="/tmp/nextcloud-databkp_$(date +"%Y%m%d").log"
|
||||||
|
|
||||||
# rsync mit Ausschlussfiltern:
|
# rsync mit Ausschlussfiltern:
|
||||||
# --exclude 'DATEINAME': Verhindert, dass diese Datei kopiert wird
|
# --exclude 'DATEINAME': Verhindert, dass diese Datei kopiert wird
|
||||||
@@ -39,7 +41,7 @@ rsync -avzh \
|
|||||||
--exclude 'flow.log.1' \
|
--exclude 'flow.log.1' \
|
||||||
--exclude 'appdata_ocubwyrxncdg' \
|
--exclude 'appdata_ocubwyrxncdg' \
|
||||||
--progress \
|
--progress \
|
||||||
"$SOURCE_DIR" "$REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR"
|
"$SOURCE_DIR" "$REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR" > $logfilename
|
||||||
|
|
||||||
# Status prüfen
|
# Status prüfen
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
@@ -47,4 +49,6 @@ if [ $? -eq 0 ]; then
|
|||||||
else
|
else
|
||||||
Mesg="${Mesg}Nextcloud Data rsync failed."
|
Mesg="${Mesg}Nextcloud Data rsync failed."
|
||||||
fi
|
fi
|
||||||
sendMessage2Room $NC_URL $NC_USER $NC_APP_PASSWORD $ROOM_TOKEN "$Mesg"
|
MesgID=$(sendMessage2Room $NC_URL $NC_USER $NC_APP_PASSWORD $ROOM_TOKEN "$Mesg")
|
||||||
|
sendFile2Room $NC_URL $NC_USER $NC_APP_PASSWORD $ROOM_TOKEN $logfilename "/"
|
||||||
|
rm $logfilename
|
||||||
|
|||||||
Reference in New Issue
Block a user