Author Login
Post Reply
Quoting Kaushal Shriyan <kaushalshriyan@(protected)>:
> Correct me if i am wrong please. I want to understand your script
>
> step 1 : put the above code in text file and name it as rsync-host77.sh in
> the folder /home/kaushal in the machine where rsync command will execute
>
> step 2 :
>
> cd /home/kaushal
> $crontab -e
>
> 0 18 * * * rsync -host77.sh
>
> If i want to run the rsync script at 6 pm everyday
>
> Also where will the "rsync-${TIMESTAMP}.log" file will be located, I believe
> it will be in /home/kaushal folder. Lets say if i have to put
> "rsync-${TIMESTAMP}.log" in /tmp folder
>
> then the above rsync line would look like
>
> rsync -av /bogus foo@(protected)
>
> is that correct what i understand from your email
You are correct, sir! You must also, of course, be sure to chmod u+x
rsync-host77.sh.
Note that if you want an e-mail on either success or failure (your
original post seemed to indicate this might be the case) bash
understands "if-then-else-fi".
Cheers,
-Collin
--
Collin Starkweather, Ph.D.
http://www.linkedin.com/in/collinstarkweather
--
gentoo-user@(protected)