I added a couple of post job bash scripts that analyze some parts of the log. The problem is that the results I get are different and limited in comparison with when I run them as root through SSH.
These two scripts analyze the jet backup log and put some statistics in a .txt file which after that I export. I looked at the log file and everything seems ok:
If I run the same script through a simple cron, the resulted output is correct.
From what I tested, there seems to be a permission or environment issue with the post job scripts. Is there a way to debug this or can someone point me in the right direction? Alternatively, is there a way to add some hooks to run my scripts after the backup job is done?
It appears to be an issue particular to your environment. Please create a ticket with our help desk by emailing support@jetapps.com or visiting the link below because we MAY need access to your servers and don't want to work over a public forum, for security concerns. Thank you!
Just a follow up's to Alex's response, please try the following -
1. print the environment from ssh running as root (printenv).
2. do the same from the cron (print output to a file)
3. compare them, add the missing env variables to the cron
@elialum I forgot to update this thread. That's exactly what I did and found out that the env for the jetbackup scripts was empty, so I exported what I needed in the bash script, but the problem still persists.