Bugfix: restic; testvar vergessen

This commit is contained in:
Michael Grote 2021-01-05 17:58:59 +01:00
parent 2055e122eb
commit 6e07b2b17a

View file

@ -41,7 +41,7 @@ do
{ # ist keine Subshell sondern Grouping; https://askubuntu.com/questions/662190/write-the-output-of-multiple-sequential-commands-to-a-text-file { # ist keine Subshell sondern Grouping; https://askubuntu.com/questions/662190/write-the-output-of-multiple-sequential-commands-to-a-text-file
echo "--------------------------------------------------" # Trenner logfile echo "--------------------------------------------------" # Trenner logfile
echo $(date) # Datum für logfile echo $(date) # Datum für logfile
restic -r {{ restic_mount }} --password-file /etc/restic/password.txt backup --exclude-file /etc/restic/exclude.txt /home/mg/rt # execute Backup restic -r {{ restic_mount }} --password-file /etc/restic/password.txt backup --exclude-file /etc/restic/exclude.txt {{ restic_folders_to_backup }} # execute Backup
restic_return_value=$? # schreib Exit Code in Variable restic_return_value=$? # schreib Exit Code in Variable
if ( [[ "$restic_return_value" -eq 0 ]] ); # Prüfung ob restic erfolgreich war(setze Abbruchbedingung), wenn nicht warte 1min und zähle die Abbruchbedingung hoch if ( [[ "$restic_return_value" -eq 0 ]] ); # Prüfung ob restic erfolgreich war(setze Abbruchbedingung), wenn nicht warte 1min und zähle die Abbruchbedingung hoch
then then