Page 1 of 1

Stop cobian backup in case of pretreament error

Posted: 17 Mar 2024, 17:03
by pacou
Hi all
I would like stop (escape) backup task in case of pre-treatment failure. For intense if a directory is not available or does'nt exist
I'm using powershell, win 11 and Cobian reflector 2.5
On more thing
It's possible to insert it's own logs in Cobian journal

Thanks

Re: Stop cobian backup in case of pretreament error

Posted: 17 Mar 2024, 18:17
by cobian
In the powershell script just return some number != 0.

About the log, not possible in this version yet.

Re: Stop cobian backup in case of pretreament error

Posted: 17 Mar 2024, 19:27
by pacou
Thanks for you quick answer.
I don't understand why my backup starts even if my pre-script return 99.
Pacou

Re: Stop cobian backup in case of pretreament error

Posted: 18 Mar 2024, 08:44
by Ushavilash
pacou wrote: 17 Mar 2024, 17:03 Hi all
I would like stop (escape) backup task in case of pre-treatment failure. For intense if a directory is not available or does'nt exist
I'm using powershell, win 11 and Cobian reflector 2.5
On more thing
It's possible to insert it's own logs in Cobian journal

Thanks
Have you attempted implementing a script in PowerShell to detect pre-treatment errors, such as directory unavailability, and halt the Cobian backup task accordingly?

Re: Stop cobian backup in case of pretreament error

Posted: 18 Mar 2024, 09:01
by cobian
Options-Engine-Analyze exit code must be selected.

Re: Stop cobian backup in case of pretreament error

Posted: 18 Mar 2024, 18:09
by pacou
I got it
PowerShell.exe -command "c:\Users\pacou\Downloads\Pre-event.ps1"; exit $LASTEXITCODE :-D

Re: Stop cobian backup in case of pretreament error

Posted: 18 Mar 2024, 20:51
by cobian
:OK