Page 1 of 1
Check if NFS mount is mounted before running job
Posted: Fri Mar 28, 2025 12:54 pm
by IMTheNachoMan
I have an NFS mount on my Linux server. Sometimes the NFS server is unavailable and is not mounted.
How can I tell Syncovery to first check if the NFS mount is mounted before running the job? If it is not mounted, then don't run the job.
Re: Check if NFS mount is mounted before running job
Posted: Fri Mar 28, 2025 1:22 pm
by tobias
Hello,
the easiest solution is the checkmark
"Run Only If Neither Side Is Empty"
on the "Job" tab sheet in the profile.
Re: Check if NFS mount is mounted before running job
Posted: Fri Mar 28, 2025 4:45 pm
by IMTheNachoMan
Oh. Brilliant.
That will work most of the time I think.
Sometimes when the NFS server is down, and my computer is rebooted, it can't mount the NFS mount but the folder is still there on the root disk. And so sometimes files end up writing to it.
But this should work good enough for me.
Or maybe, is there a pascal script I could run that checks for the existing of a specific file and if that file is not there then it doesn't run the job?
Re: Check if NFS mount is mounted before running job
Posted: Fri Mar 28, 2025 8:24 pm
by tobias
Hello,
yes, you can use this script:
Code: Select all
function OnProfileStart:Boolean;
begin
Result:=FileExists('/mnt/volxyz/signalfile.txt');
end;
Re: Check if NFS mount is mounted before running job
Posted: Fri Mar 28, 2025 9:24 pm
by IMTheNachoMan
Love it. Thank you!