pre backup event fails but backup still executes

Questions about Cobian Reflector
Post Reply
bjshaw
Posts: 4
Joined: 30 Oct 2022, 12:50

pre backup event fails but backup still executes

Post by bjshaw »

Hi, I am having an intermittent problem with a network attached disk. I am backing up to a mapped drive, sometimes it works perfectly and sometimes it fails to recognise the network name for the disk drive. I will work on resolving this issue but in the mean time I want to check in a pre backup event that the disk can be accessed and if that fails I don't want the task to run the backup.
So I have set up a pre backup event that runs a batch file that contains a "net use" command that will either find the network name or not. I also tried a DIR of the mapped drive which gave similar results. I have then set the task not to run the backup if the pre backup events fail. However what I see in the log when the command fails is "The event couldn't be executed by the user interface. Executing it locally" and then "The commands have been successfully executed" and it goes on to execute the backups which all fail, recording it as though the backup was successful, even though it backed up no files.
How can I make it not run the backup when the pre backup events fail? Do I need to cause a more serious failure? What will it consider a failure?
I am also puzzled that when the backup fails in this way it still says that it has deleted old backups but it doesn't actually delete anything. I put in a pause for 1 hour as a post backup event to allow time for the deletions before shutdown and this works well when the backups are successful.
I attach log examples of successful and unsuccessful backups.
ps. many thanks for the use of your software.
Attachments
Cobian Reflector example logs.zip
(6.61 KiB) Downloaded 55 times
User avatar
cobian
Site Admin
Posts: 4639
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: pre backup event fails but backup still executes

Post by cobian »

Use a return code for your batch file and select the option to analyze return codes.
--
Luis Cobian
Cobian Backup's creator
Post Reply