Start backup if condition

Questions about Cobian Reflector
Post Reply
dedel53
Posts: 3
Joined: 24 Nov 2022, 17:12

Start backup if condition

Post by dedel53 »

Hi

Is it possible to start the backup only if I am on same local network as the destination Nas.

Thanks
User avatar
cobian
Site Admin
Posts: 4492
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Start backup if condition

Post by cobian »

No. The task will start but it will end with a "Destination not found" error.
--
Luis Cobian
Cobian Backup's creator
ira
Posts: 101
Joined: 02 Nov 2021, 19:16

Re: Start backup if condition

Post by ira »

Couldn't one conceptually create a batch file like:

if not exist \\whatever return error

and put in in a before event and click "cancel the task if some event fails?"
dedel53
Posts: 3
Joined: 24 Nov 2022, 17:12

Re: Start backup if condition

Post by dedel53 »

Can you please give me an example
ira
Posts: 101
Joined: 02 Nov 2021, 19:16

Re: Start backup if condition

Post by ira »

dedel53 wrote: 25 Nov 2022, 16:26 Can you please give me an example
Conceptually I think you make a Before event containing a line like this:

/C if not exist \\server\SomeFolder\SomeFile exit /b -1

or make a batch file containing:

if not exist \\server\SomeFolder\SomeFile exit /b -1
exit 1

and then the Before event becomes:

/c batchfile.bat

I've no idea what Reflector considers an error that triggers "cancel the task if some event fails," but it's probably one of -1, 0 or 1 with my first guess being -1. And I've no idea if it will work. it will still need to timeout looking for the drive, but should in theory avoid trying to copy the files and failing.
Post Reply