Page 1 of 2
Trigger profile externally after Veeam Backup Job Completes
Posted: Tue Jun 07, 2022 8:37 am
by bouncy
I was wondering if their was any way to trigger a specific profile after a Veeam backup job had been completed. I know that I can run a script after a veeam job has completed, however i would need to know how if at all possible i would interact with Syncovery in order to know whats going to go in that script. The syncovery install is on a qnap in case that is relevant, and they are both on the same subnet.
Any help would be much appreciated.
Re: Trigger profile externally after Veeam Backup Job Completes
Posted: Tue Jun 07, 2022 8:39 am
by tobias
Hello,
thanks for your post!
So Veeam is running on a Windows machine, and when done you would like to start a Syncovery job on QNAP?
Re: Trigger profile externally after Veeam Backup Job Completes
Posted: Tue Jun 07, 2022 8:41 am
by bouncy
Hello, and thanks for the quick reply.
That is correct. Ideally I would like to get data offsite as soon as the backup jobs completed rather than having an arbitrary scheduled time as I do now.
Re: Trigger profile externally after Veeam Backup Job Completes
Posted: Wed Jun 08, 2022 7:28 am
by bouncy
im guessing thats a no?
Re: Trigger profile externally after Veeam Backup Job Completes
Posted: Wed Jun 08, 2022 8:03 am
by tobias
Everything is possible, but the difficulty varies. There is no easy answer. I have to investigate.
Re: Trigger profile externally after Veeam Backup Job Completes
Posted: Wed Jun 08, 2022 8:16 am
by bouncy
Sorry, wasn't trying to rush you, was just trying to clarify if their was or wasn't current built in functionality to achieve this.
Many thanks.
Re: Trigger profile externally after Veeam Backup Job Completes
Posted: Wed Jun 08, 2022 8:27 am
by tobias
Currently you'd need to automate an SSH login and invoke a command line, or be able to trigger an HTTP POST that must appear to come from localhost to the URL
https://localhost:8999/post_runprofile.php
with the form parameter
ProfileName=xyz
I will try to add an easier HTTP API in the next update. You would need to whitelist the Windows machine's IP so that no login is needed to invoke a command.
Re: Trigger profile externally after Veeam Backup Job Completes
Posted: Wed Jun 08, 2022 9:05 am
by tobias
Another way would be if you put a signal file in some folder on the QNAP.
One profile could run every 1 minute and look for the signal file. If it's there, it could copy it to some dummy destination folder. It could have an "Execute before/after" command like this:
++RUN PROFILE Your Main Profile
This would trigger your main profile only if the signal file was detected.
So every time the signal file is created new (with a new timestamp), the job would be triggered.
Example command line on Windows:
Code: Select all
echo "Do It" >\\192.168.12.48\Public\signal.txt
Re: Trigger profile externally after Veeam Backup Job Completes
Posted: Wed Jun 08, 2022 9:08 am
by bouncy
i imagine the signal file will be easier to implement. i will look into it a little further. Many thanks for your help.
Re: Trigger profile externally after Veeam Backup Job Completes
Posted: Wed Jun 08, 2022 1:38 pm
by bouncy
I tried going down the posting the form route. I have little experience with this, but I chose CURL with the command:-
C:\temp>curl -H "Origin: http://localhost" "http://username:password@IPADDRESS:8999/post_runprofile.php" -d "ProfileName=VM_With_SQL"
and got the error:-
An Exception occurred:JSON could not be parsed, error accessing field ProfileName@ 00000000004D522BApplication Error At 00000000004D522B on 06/08/2022 14:40:25
Exception TWebServerException: JSON could not be parsed, error accessing field ProfileName
Executable: /share/CACHEDEV1_DATA/.qpkg/SyncoveryCL/SyncoveryCL
Reporting Thread ID: 140329550100224
Size: 26206792 (64-bit)
Exception in WebServ, post_runprofile.php, params=ProfileName=VM_With_SQL
Parameter: start
Parameter: /INI=/share/CACHEDEV1_DATA/.qpkg/SyncoveryCL/Syncovery.cfg
Client Pipes: 0, Threads: 0
Server Pipes: 2, Threads: 4
Stack Trace
-----------
Exception class: TWebServerException
Stacktrace:
$00000000004D522B
$0000000000510461
$0000000001365CD2
$0000000001366D17
$000000000123B5B5
$0000000001234AEA
$0000000001234673
$00000000012330F5
$000000000043F388
-----------
I'm assuming I haven't done what you suggested?
Many thanks.