Stop cobian backup in case of pretreament error

Questions about Cobian Reflector
Post Reply
pacou
Posts: 8
Joined: 17 Mar 2024, 16:47

Stop cobian backup in case of pretreament error

Post 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
User avatar
cobian
Site Admin
Posts: 4611
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Stop cobian backup in case of pretreament error

Post by cobian »

In the powershell script just return some number != 0.

About the log, not possible in this version yet.
--
Luis Cobian
Cobian Backup's creator
pacou
Posts: 8
Joined: 17 Mar 2024, 16:47

Re: Stop cobian backup in case of pretreament error

Post by pacou »

Thanks for you quick answer.
I don't understand why my backup starts even if my pre-script return 99.
Pacou
Ushavilash
Posts: 10
Joined: 22 Feb 2024, 12:41

Re: Stop cobian backup in case of pretreament error

Post 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?
User avatar
cobian
Site Admin
Posts: 4611
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Stop cobian backup in case of pretreament error

Post by cobian »

Options-Engine-Analyze exit code must be selected.
--
Luis Cobian
Cobian Backup's creator
pacou
Posts: 8
Joined: 17 Mar 2024, 16:47

Re: Stop cobian backup in case of pretreament error

Post by pacou »

I got it
PowerShell.exe -command "c:\Users\pacou\Downloads\Pre-event.ps1"; exit $LASTEXITCODE :-D
User avatar
cobian
Site Admin
Posts: 4611
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Stop cobian backup in case of pretreament error

Post by cobian »

:OK
--
Luis Cobian
Cobian Backup's creator
Post Reply