melloa
Wizard
- Joined
- May 22, 2016
- Messages
- 1,749
I've created a hourly cron job, but I don't see it running at all.
Manually will run fine
/var/logs/message:
Dec 19 14:16:19 nas cronjob: receiving incremental file list
Dec 19 14:16:22 nas cronjob:
Dec 19 14:16:22 nas cronjob: sent 9,331 bytes received 4,412,287 bytes 1,263,$
Dec 19 14:16:22 nas cronjob: total size is 24,158,670,145,845 speedup is 5,463$
System Specs
S9SRL-F
OS Version:
FreeNAS-11.2-U7
(Build Date: Nov 19, 2019 0:4)
Processor:
Intel(R) Xeon(R) CPU E5-1620 0 @ 3.60GHz (8 cores)
Memory:
32 GiB
The script
Assume is my Xtupidity ... any ideas?
Manually will run fine
/var/logs/message:
Dec 19 14:16:19 nas cronjob: receiving incremental file list
Dec 19 14:16:22 nas cronjob:
Dec 19 14:16:22 nas cronjob: sent 9,331 bytes received 4,412,287 bytes 1,263,$
Dec 19 14:16:22 nas cronjob: total size is 24,158,670,145,845 speedup is 5,463$
System Specs
S9SRL-F
OS Version:
FreeNAS-11.2-U7
(Build Date: Nov 19, 2019 0:4)
Processor:
Intel(R) Xeon(R) CPU E5-1620 0 @ 3.60GHz (8 cores)
Memory:
32 GiB
The script
Code:
#!/bin/sh # # Variables cdate=$(date +"%Y%m%d%H%M%S") # # e-mail at task start touch ./cover.txt # Write email header to temp file ( echo "To: ***************" echo "Subject: RAID sync started" echo "From: ************" echo " " echo $cdate ) > ./cover.txt # Send status email sendmail -t < ./cover.txt # # Creates snapshot before rsync #zfs snapshot -r raid/cifs@$cdate # # rsync cifs #cd /raid rsync --progress --delete -rltuv root@mellonas:/mnt/raid /mnt #rsync --progress -rltuv root@mellonas:/mnt/raid /mnt # # Creates snpashot after rsync cdate=$(date +"%Y%m%d%H%M%S") #zfs snapshot -r raid/cifs@$cdate # # e-mail at task end touch ./cover.txt # Write email header to temp file ( echo "To: ********" echo "Subject: RAID sync finished" echo "From: *************" echo " " echo $cdate ) > ./cover.txt # Send status email sendmail -t < ./cover.txt
Assume is my Xtupidity ... any ideas?
Last edited: