Hi,
I have setup a cloud credential and a cloud sync task in my TrueNAS CORE 12.0 system to run once a day.
It is possible to see the results and view/download the log on the "Cloud Sync Tasks" page. There is also the possibility to set up an alert for a failed cloud sync task on the "system - Alert settings", but I did not find an option to always email the results of a cloud sync task.
What I would like is to have the results/log send to me after completion of the sync task.
I was thinking of using the "post-script option of the sync task to do so.
I am not very familiar with scripting, so I started searching for similar scripts.
I came across this topic A script to run rclone on the FreeNAS server to backup NAS data to Backblaze B2 cloud storage that pointed to this script on github.
Preferrably I would not use the script to do the sync task but just use the GUI to set this up, so I mainly focussing on the e-mail reporting part of this script.
I think I can modify this (extract the part that is formatting and sending the email), but am lost as where to get the log/output that the cloud sync task produces so it can be processed.
I have setup a cloud credential and a cloud sync task in my TrueNAS CORE 12.0 system to run once a day.
It is possible to see the results and view/download the log on the "Cloud Sync Tasks" page. There is also the possibility to set up an alert for a failed cloud sync task on the "system - Alert settings", but I did not find an option to always email the results of a cloud sync task.
What I would like is to have the results/log send to me after completion of the sync task.
I was thinking of using the "post-script option of the sync task to do so.
I am not very familiar with scripting, so I started searching for similar scripts.
I came across this topic A script to run rclone on the FreeNAS server to backup NAS data to Backblaze B2 cloud storage that pointed to this script on github.
Preferrably I would not use the script to do the sync task but just use the GUI to set this up, so I mainly focussing on the e-mail reporting part of this script.
I think I can modify this (extract the part that is formatting and sending the email), but am lost as where to get the log/output that the cloud sync task produces so it can be processed.
- Can anybody help me by pointing out where a script can retrieve the content of a cloud sync task log?