Hi,
I just updated from 9.3.1 to 9.10. I had written a script a while ago, that I was using to make my life easier. After the update that script stopped working. I used the script before updating to 9.10, it was working perfectly fine.
I have not touched the script otherwise.
This is the script:
The output is:
Any ideas?
Cheers,
Eddi
I just updated from 9.3.1 to 9.10. I had written a script a while ago, that I was using to make my life easier. After the update that script stopped working. I used the script before updating to 9.10, it was working perfectly fine.
I have not touched the script otherwise.
This is the script:
Code:
#!/bin/bash source=$1 destination=$2 NOW=$(date +"%Y-%m-%d") log="$NOW.log" tmp="$NOW.tmp" if [ ! -f ~/rsyncLogFiles/$log ]; then echo "Log File does not exist, creating log $log." touch ~/rsyncLogFiles/$log printf "######################## START OF RSYNC FILE ON $NOW FOR $source ########################\n" >> ~/rsyncLogFiles/$log else echo "Log File $log already exists." printf "\n\n######################## NEW RSYNC FOR $source ########################\n" >> ~/rsyncLogFiles/$log fi echo "--- RSYNC FOR $source TO $destination ON $NOW ---" > ~/rsyncLogFiles/$tmp rsync -ahviPt --sparse --delete --stats --human-readable --exclude-from="/root/rsync-exclude.txt" --delete-excluded $3 $4 $5 $6 $7 $source $destination | tee -a ~/rsyncLogFiles/$log ~/rsyncLogFiles/$tmp mail -s "RSYNC Completed to Backup 2TB of $source" "home@emailhere.com" < ~/rsyncLogFiles/$tmp echo "Email send to home@emailhere.com." rm ~/rsyncLogFiles/$tmp
The output is:
Code:
[root@freenas] ~# ./runRsync.sh ./runRsync.sh: Command not found.
Any ideas?
Cheers,
Eddi