Non-interactive Dietpi-backup 1 still shows popup


I am launching dietpi-backup within a script to automatically create a backup without user interaction.

I use this command:
/boot/dietpi/dietpi-backup 1

But this command opens a menu that shows the file list and has to be closed with ‘OK’ to proceed. → not wanted

Applying G_INTERACTIVE=0 at the top of the script has no effect either.

Question: how can a trigger a backup without any UI popping up (to ultimately run this via cron as part of a bigger script).

I am on 8.15.2


usually /boot/dietpi/dietpi-backup 1 should run the backup without any user interface shown up. How does it behave if you run it directly from CLI? Did a quick test on my demo system without issue.

I get the same result as with the script:

The backup runs through but still shows the ‘backup completed’ followed by file list windows at the end.

I have to close both windows via ‘OK’

Yes indeed the file list is shown at the end if your run it from CLI

That’s how we do it on our daily backup script. At the beginning we export G_INTERACTIVE=0

and the backup is called like this

I guess you would need to include DietPi globals. Otherwise G_INTERACTIVE=0 might have no efect.

I was using
in my script.

seems to work as expected.

You can mark this as solved.

Thanks for your help!