Before posting, and to avoid disappointment, please read the following:

  • This forum is not for 2BrightSparks to provide technical support. It's primarily for users to help other users. Do not expect 2BrightSparks to answer any question posted to this forum.
  • If you find a bug in any of our software, please submit a support ticket. It does not matter if you are using our freeware, a beta version or you haven't yet purchased the software. We want to know about any and all bugs so we can fix them as soon as possible. We usually need more information and details from you to reproduce bugs and that is better done via a support ticket and not this forum.

"Run before profile" does not run before profile starts

For technical support visit https://support.2brightsparks.com/
Post Reply
CTreffler
Newbie
Newbie
Posts: 7
Joined: Mon Dec 20, 2021 9:22 am

"Run before profile" does not run before profile starts

Post by CTreffler »

Hello,

I use SyncBackSE V8.9.15.0 on a Windows 10 (64bit) system. I want to run profiles to back up files via a VPN connection.
For that purpose I want to use 'Run before profile' to run a PowerShell script which opens the V'PN connection. That action is also logged by the script.
This works fine when clicking on the 'Test' button in the respective setup menu.

But when I run the profile it shows "Preparing to execute" in the status bar and does not start backup. There are also no logs showing that the VPN is opened.
If I open the VPN before I run the profile, the log shows an attempt to open the already opened VPN and the profile runs successfully.

It seems to me that the profile first tries to access the destination folder. And only if that is successful, it starts the 'Run before profile' program.
That, of course, makes my attempt to open the VPN before running the profile fruitless.

Is there any workaround for this?
Does V10 behave differently?

Regards,
Christian
mmullins_98
Expert
Expert
Posts: 202
Joined: Wed Jun 05, 2019 11:40 am

Re: "Run before profile" does not run before profile starts

Post by mmullins_98 »

I would suggest trying unticking the option "Wait until the program has finished before running profile" and instead ticking the option "Wait for a maximum of < 10 > seconds for the program to finish".
CTreffler
Newbie
Newbie
Posts: 7
Joined: Mon Dec 20, 2021 9:22 am

Re: "Run before profile" does not run before profile starts

Post by CTreffler »

If I untick "Wait until the program has finished before running profile", the option "Wait for a maximum of < 10 > seconds for the program to finish" is greyed out.
Besides: My problem is that the problem does not run at all.

Regards,
Christian
mmullins_98
Expert
Expert
Posts: 202
Joined: Wed Jun 05, 2019 11:40 am

Re: "Run before profile" does not run before profile starts

Post by mmullins_98 »

Tick both and try it.
CTreffler
Newbie
Newbie
Posts: 7
Joined: Mon Dec 20, 2021 9:22 am

Re: "Run before profile" does not run before profile starts

Post by CTreffler »

I already tried every possible combination of ticks :D
And I tried the trial Version of SyncBackSE V10.
No luck so far.

Regards,
Christian
mmullins_98
Expert
Expert
Posts: 202
Joined: Wed Jun 05, 2019 11:40 am

Re: "Run before profile" does not run before profile starts

Post by mmullins_98 »

Are you running the profile from Windows task scheduler when it fails?
mmullins_98
Expert
Expert
Posts: 202
Joined: Wed Jun 05, 2019 11:40 am

Re: "Run before profile" does not run before profile starts

Post by mmullins_98 »

In my testing of the "Programs - Before" I do not see any situation where it fails even when the destination is not available. I also use it in a couple of daily profiles with no problem.

If you are seeing "Preparing to execute" then that indicates your script finished but it must not have succeeded in preparing the VPN for your profile. The script may not leave the VPN open to the profile as it could be in a different Windows session which may have to do with Powershell. My profiles use batch files so if possible maybe try not using Powershell.
CTreffler
Newbie
Newbie
Posts: 7
Joined: Mon Dec 20, 2021 9:22 am

Re: "Run before profile" does not run before profile starts

Post by CTreffler »

Thank you for trying to reproduce this.
Did you try with destinations (available or not) on local computer, or also on network shares?

I made a test with notepad as program to be executed before running the profile.

If the destination is on local hard drive, notepad always runs, even if the destination folder does not exist.
If I use a network share as destination, notepad runs when that destination is available. If I enter wrong credentials for that destination, notepad does not run.
If I use the VPN-Connection as destination, notepad runs, if the VPN is opened before starting the profile. If it is not opened, notepad does not run.

Conclusion: If the destination needs credentials to conect to it, SyncBackSE first tries to reach the destination before it actually runs the "Run before profile" program.

Regards,
Christian
CTreffler
Newbie
Newbie
Posts: 7
Joined: Mon Dec 20, 2021 9:22 am

Re: "Run before profile" does not run before profile starts

Post by CTreffler »

Regarding task scheduler: No, currently I try to run it from the SyncBackSE menu.
mmullins_98
Expert
Expert
Posts: 202
Joined: Wed Jun 05, 2019 11:40 am

Re: "Run before profile" does not run before profile starts

Post by mmullins_98 »

Suggest you submit the problem as stated by a developer: "Please generate/submit a support zip with debug logs of the profile run to [email protected] for investigation. Full instructions for creating and submitting the support zip are given here: https://help.2brightsparks.com/support/ ... 3000335603 ..."
CTreffler
Newbie
Newbie
Posts: 7
Joined: Mon Dec 20, 2021 9:22 am

Re: "Run before profile" does not run before profile starts

Post by CTreffler »

Thanks you for that tip.
The debug logs can be read and confirm: The network destination is accessed before 'run before profile'. And if it cannot be reached, the program is never run.

So instead of starting a profile via task scheduler, I'll have to start a script which first opens the VPN and then starts the pofile. That's at least a workaround.

Regards,
Christian
CTreffler
Newbie
Newbie
Posts: 7
Joined: Mon Dec 20, 2021 9:22 am

Re: "Run before profile" does not run before profile starts

Post by CTreffler »

2BrightSparks support helped me solve this. The root cause is the option "Silently fail if destination/right cannot be reached through the network...". That can be found at 'Copy/Delete' => 'Network settings'.
If that is enabled, SyncBack checks network availabity first before running the 'Run before profile' program.

Regards,
Christian
Post Reply