From 7bf0511e81e12d7fa53d0d4ac68a9c43e211c957 Mon Sep 17 00:00:00 2001 From: naturallaw77 Date: Mon, 18 Mar 2024 23:07:16 -0700 Subject: [PATCH] updated external_backup with error logs --- .../Sovran_SystemsOS_External_Backup.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Sovran_SystemsOS_External_Backup/External Backup Source Files/Sovran_SystemsOS_External_Backup.sh b/Sovran_SystemsOS_External_Backup/External Backup Source Files/Sovran_SystemsOS_External_Backup.sh index 6ee3304..0b95909 100755 --- a/Sovran_SystemsOS_External_Backup/External Backup Source Files/Sovran_SystemsOS_External_Backup.sh +++ b/Sovran_SystemsOS_External_Backup/External Backup Source Files/Sovran_SystemsOS_External_Backup.sh @@ -16,10 +16,12 @@ SAGE () { time_stamp=$(date +%Y-%m-%d-%T) -if ! ssh root@localhost rsync -ar /run/media/Second_Drive/BTCEcoandBackup/NixOS_Snapshot_Backup/hourly.0 /"$file"/"$time_stamp"; then +mkdir -p /home/free/Documents/External_Backup_Logs + +if ! ssh root@localhost 'rsync -ar /run/media/Second_Drive/BTCEcoandBackup/NixOS_Snapshot_Backup/hourly.0 /"$file"/"$time_stamp" 2>&1 | tee /home/free/Documents/External_Backup_Logs/{$time_stamp}_External_Backup_Log.txt'; then zenity --error \ - --width=700 \ + --width=500 \ --title="Sovran_SystemsOS External Backup" \ --text="Error Could Not Backup." @@ -53,7 +55,7 @@ else CHOOSE -SAGE | zenity --progress --no-cancel --auto-close --width=660 --pulsate --text="Backing up now. It could take up to 4 hours for it to finish depending on the amount of data stored on your Sovran Pro and the speed of your external hard drive. Be patient..." --title="Sovran_SystemsOS External Backup" +SAGE | zenity --progress --no-cancel --auto-close --width=950 --pulsate --text="Backing up now. It could take up to 4 hours for it to finish depending on the amount of data stored on your Sovran Pro and the speed of your external hard drive. Be patient..." --title="Sovran_SystemsOS External Backup" fi exit 0