Duplicati stops making backups

Hello everyone, i am new in duplicati and have some trouble that duplicati stopsmaking backups after a couple of days.
First of all sorry for my english, german is my native language.

Some month ago duplicati works fine and withoput problems,but suddenly it starts with trouble.
I hope anyone can help me.

Let me know what information you need.

best regards Mikel

Hello and welcome!

What happens when it stops working? Do you get error messages, and if so, what are they?

I notice it because no more emails come. Then when I look in the web interface, there are some ERROR popups.
My backup scenario is quite complex. I will try to explain it:
I have 3 backup jobs. All of them start at 10pm.

  1. job Backup Server
  2. job External_1
    3rd job External_2

The 1st job backs up to a server, for the 2nd and 3rd jobs there is an external hard drive for each, alternating between them on the computer.
This is my configuration for job 1 and 2

--alternate-destination-marker=backup1.txt
--alternate-target-paths=*:\backup
--send-mail-body=C:\Tools\extern\email.txt
--send-mail-from=XXXXXXXX@magenta.de
--send-mail-password=XXXXXXX
--send-mail-to=MYEMAIL
--send-mail-level=all
--send-mail-subject=Duplicati %OPERATIONNAME% report for %backup-name%
--send-mail-url=smtps://securesmtp.t-online.de:465
--send-mail-username=XXXXXXX@magenta.de
--run-script-before=C:\Tools\extern\todo_extern.bat
--run-script-after=C:\Tools\extern\todo_extern.bat
--run-script-before-required=C:\Tools\extern\before_extern1_req.bat
--backup-test-percentage=10
--backup-test-samples=50

–run-script-before-required=C:\Tools\extern\before_extern1_req.bat

@echo off 
rem & SETLOCAL EnableDelayedExpansion

rem Edit Disklabel here:
set Disklabel=Backup1

REM *** Pfad für die Emails setzen
set Pfad=c:\tools\extern

REM *** aktuelle Systemzeit auslesen
rem  set "time=22:35"
set hour=%time:~0,2%
set min=%time:~3,2%
REM *** Zeitfenster in dem kein Backup starten darf
set "begin=4"
set "ende=21"

rem Abfrage ob Jobname ungleich Backup ist, dann springe direkt zu Label PLATTE und beachte nicht die UHRZEIT.
rem Dies wird gebraucht bei einem RESTORE, um unabhängig der Uhrzeit diesen auszuführen.
if /i "%DUPLICATI__OPERATIONNAME%" neq "Backup" goto PLATTE

if %hour% GEQ %ende% (
	echo Jetzt darf Backup1
	goto PLATTE
) ELSE (
	if %hour% LEQ %begin% (
		if %hour% EQU %begin% if %min% GTR 00 (
		echo Jetzt darf kein Backup1
		copy %Pfad%\email_praxis1.txt %Pfad%\email.txt /Y
		exit /b 0
		)
		echo Jetzt darf Backup2
		goto PLATTE
	) ELSE (
		echo Jetzt darf kein Backup2
		copy %Pfad%\email_praxis2.txt %Pfad%\email.txt /Y
		exit /b 0
	)
)

goto END 

:PLATTE
for /f "tokens=1" %%a in ('wmic volume get label ^| findstr /i Backup') do (
	echo Label = %%a
	set Label=%%a
)
echo Benutze Volume %Label%

if "%Label%"=="" (
	echo keine Platte
	copy %Pfad%\email_none.txt %Pfad%\email.txt /Y
	rem Backup wird loslaufen, aber failen.
	goto END
) else (
	echo Platte da. ist es die richtige?
	if "%Label%"=="%Disklabel%" (
		echo ok, Richtige Disk gefunden
		copy %Pfad%\email_normal.txt %Pfad%\email.txt /Y
		rem Backup wird normal laufen.
		goto END
	) else (
		echo ok, Falsche Disk gefunden
		copy %Pfad%\email_wrong.txt %Pfad%\email.txt /Y
		rem Backup wird loslaufen, aber failen.
		exit /B 3
	)
)

 :END
exit /B 0

–run-script-before=C:\Tools\extern\todo_extern.bat

REM We read a few variables first.
SET EVENTNAME=%DUPLICATI__EVENTNAME%
SET OPERATIONNAME=%DUPLICATI__OPERATIONNAME%
REM SET REMOTEURL=%DUPLICATI__REMOTEURL%
SET LOCALPATH=%DUPLICATI__LOCALPATH%
SET PARSEDRESULT=%DUPLICATI__PARSED_RESULT%
SET THUNDER=thunderbirdportable.exe
SET FIRE=firefoxportable.exe

REM Basic setup, we use the same file for both before and after,
REM so we need to figure out which event has happened
if "%EVENTNAME%" == "BEFORE" GOTO ON_BEFORE
if "%EVENTNAME%" == "AFTER" GOTO ON_AFTER

REM This should never happen, but there may be new operations
REM in new version of Duplicati
REM We write this to stderr, and it will show up as a warning in the logfile
echo Got unknown event "%EVENTNAME%", ignoring 1>&2
GOTO end

:ON_BEFORE
IF "%OPERATIONNAME%" == "Backup" GOTO ON_BEFORE_BACKUP
REM This will be ignored
echo Got operation "%OPERATIONNAME%", ignoring
GOTO end

:ON_BEFORE_BACKUP
tasklist | find /I /N "%THUNDER%">NUL
if "%ERRORLEVEL%"=="0" (
	taskkill /F /IM %THUNDER% /T >NUL
	ping -n 20 localhost> nul
) else (
	tasklist | find /I /N "Explorer.EXE">NUL
	)
tasklist | find /I /N "%FIRE%">NUL
if "%ERRORLEVEL%"=="0" (
	taskkill /F /IM %FIRE% /T >NUL
) else (
	tasklist | find /I /N "Explorer.EXE">NUL
	)

GOTO end

:ON_AFTER
IF "%OPERATIONNAME%" == "Backup" GOTO ON_AFTER_BACKUP
REM This will be ignored
echo "Got operation "%OPERATIONNAME%", ignoring	"
GOTO end

:ON_AFTER_BACKUP
rem start shutdown.exe /s /f /t 60
start calc.exe
GOTO end

REM We want the exit code to always report success.
REM For scripts that can abort execution, use the option
REM --run-script-on-start-required = <filename> when running Duplicati
:end
exit /B 0

For job 2 is --alternate-destination-marker=backup2.txt

The process looks like this:

At 10pm the server backup starts.
As soon as this is finished, job 2 starts.
Job 2 checks if the correct disk is connected and if there is a disk connected at all. If the correct disk is connected, the backup job starts. If the wrong disk or no disk at all is connected, the backup job should not be executed.
As soon as job 2 is finished, job 3 starts.
Job 3 checks whether the correct disk is connected and whether a disk is connected at all. If the correct disk is connected, the backup job starts. If the wrong disk or no disk at all is connected, the backup job should not be executed.

Basically this seems to work, but the errorhandling of Duplicati gives me problems. It looks like it only sends emails when the backup job is started. It does not send emails if the job is not executed because of an error or a warning. Error 1,3,5.

Many greetings Mike

I tested and confirmed. I see the same thing. In addition to no email notification, no HTTP report is submitted either (I use duplicati-monitoring). I’m not sure if this design is intentional or not. I could see an argument either way.

but duplicati-monitoring not solve the problem that duplicati suddenly stops after some days… a few month ago it runs perfect and i change nothing since then…

Hello

You say you see errors in the interface (“ERROR popups” ?). if you click on the last popup, do you see something in the log ? in About / Show log, is the first entry at the moment you expect your last backup to run, what is the status, if it is failed and you click on it, can you find an explanation ?

hi i will check this at my client, i will visit him today and see what messages i can get.

No, it doesn’t. I wasn’t really suggesting it as a solution, but it would at least alert you that no backup has run in the past X days.

Is the main problem that backups stop running completely? I thought it was due to the pre-backup script causing the job to not run (because external drives are not found). Maybe I misunderstood.

I will try to explain the process:

There are 3 backup jobs, all start at 10pm. First the server job starts, then the EXTERN 1 and then EXTERN 2 job.

In the script : -run-script-before-required
In this script the current time is checked on the one hand and on the other hand it is checked whether the correct or an external disk is connected.
If the time is correct and the right disk is connected, the script is terminated with exit /b 0. In another case the script is terminated with an error code. In this case the backup job is not started and duplicati generates an error message.
If the correct disk is connected, the corresponding backup job is executed. Otherwise the next backup job starts and again the script -run-script-before-required is executed.
However, an error message is always generated because either the EXTERN 1 or the EXTERN 2 job fails, depending on which disk is connected.

I have not been able to figure out why for a few weeks now the backups are not running after a few days. When I started duplicati a few months ago, everything worked fine with the same scripts.
Maybe some Windows 10 updates are to blame.

Translated with DeepL Translate: The world's most accurate translator (free version)

Any other system information would help, such as what the screen shows in its top line status, what the screen shows for its backup jobs, what color the TrayIcon is if it’s used, how recovery is done from this.

There is no remote system access here? Setting up logs and such may help, but how do you get them?

Right now all we know is there is no email? That’s not much to go on. The diagnostics at top will help to determine whether or not the backup stopped and where. If that points to a script, you can instrument it, and if it points to Duplicati, log-file=<path> log-file-log-level=<information-or-higher-later> can help that.

One problem with job level log files is you use three jobs. Logging at server level can log them together. Duplicati.Server.exe covers that, but you’d have to set that to Server or TrayIcon however you run them.

Couple ideas… can you add some simple logging to your script? Something simple like this:

echo %date% %time% >> logfile

This will help us tell if Duplicati is trying to run backups and the script is perhaps mistakenly canceling the job, or if Duplicati is not trying to run the job at all.

Also, I think I recall something about --run-script-before-required not actually behaving the same when it comes to exit codes as --run-script-before. Try using --run-script-before instead. If you use exit 1 then no error/warning should be generated at all by Duplicati (it silently aborts the job with an OK status).

I can’t find the particular discussion thread at the moment, but I think the “required” one is pretty much unneeded now when they added more robust errorlevel handling in the regular run-script-before option.