Before/After script running at start of Restore?

Is it normal for the BEFORE/AFTER script to be executed during the restore process?

Looks like this is the case, I added an if-statement to my BEFORE/AFTER script to only run when DUPLICATI__OPERATIONNAME == Backup.

Working correctly now.