Commifreak / unraid-appdata.backup

UNRAID AppData backup plugin
17 stars 1 forks source link

Post-run script? #14

Closed nobodyspecial closed 5 months ago

nobodyspecial commented 5 months ago

I have noticed that the "Post-run script" is running before the "Some extra options" is run. Is there a way to change this behavior?

Commifreak commented 5 months ago

Thats already fixed since latest stables. Please recheck and open if something is still not working as expected.

nobodyspecial commented 5 months ago

I just updated to plugin version 2024.02.06b and tried a scheduled backup and a manual backup and in both cases the "Post-run script" executes before the "Include extra files/folders" option.

I have a remote device running a docker that I need to stop during the backup and start after it finishes. The "Post-run script" is starting this remote docker as the files are being backed up causing "tar creation failed!" and "file changed as we read it;" errors.

Commifreak commented 5 months ago

I rechecked. postRun runs right before exit the script. No chance it gets executed earlier. Do we talk about postBackup or any other script?

https://github.com/Commifreak/unraid-appdata.backup/blob/61df76462dcab99fa0b38bccbf3a8d12f0bf1ee8/src/scripts/backup.php#L375

And extraFiles is processed at that point:

https://github.com/Commifreak/unraid-appdata.backup/blob/61df76462dcab99fa0b38bccbf3a8d12f0bf1ee8/src/scripts/backup.php#L231

nobodyspecial commented 5 months ago

Thanks for your help. I'll have to review my config.