Rsync Files Remotely - nivinm/freenas GitHub Wiki

This script rsyncs remote locations for Freenas. Its pretty self explanatory, tries to sync up 3 times and sleeps 10 seconds between each retry.

Emails: Success: I awk file types and send the output to myself to know which files were synced. Fail: I cat the log file into the email body to tell me why the job failed.

Mysql: I use jexec because mysql is installed on a separate jail.

Freenas: Save the script and make it executable (chmod +x filename.extension). Be sure to output to the same location you used here: /[your_file_log_file_path]/[log_file_name].log