I wrote a simple backup script which back ups my stuff on a remote server, everything is working great but I'd like to have some sort of report like "backup successful or not".
this is my script
# backup CHECK date1=`date +"%d.%m.%y - %H.%M"` host=`hostname` twdate=`date +"%d.%m"` performtw=`ls -la|grep "tw"|grep "$twdate" > tmp1.txt` echo $performtw if cat tmp1.txt|grep "tw" then echo backup successfull printf "tw backup success!" | mail -s "tw backup check $date1 repor$ rm tmp1.txt else echo backup failure printf "sitename backup failure!" | mail -s "site backup check $date1 repor$ rm tmp1.txt fi exit
But this isn't working really well and I ask you if there's some simpler and more powerful way to do it? Basically it just needs to check if file exists with the name starting xyz and was created at date xyz.