Le 13/03/2011 18:10, Jan-Benedict Glaw a ?crit :> On Sun, 2011-03-13 16:10:12 +0000, Adnane RABIH<rabihadnane at
gmail.com> wrote:
>> I made a script to backup a folder on a remote server it works
>> manually, I set a cron job to launch the script every 2 mins (for
>> test), I sse in the log this line
>> Mar 13 13:10:01 debian /USR/SBIN/CRON[6302]: (root) CMD (root
>> /usr/bin/backup.sh)
>>
>> but when I sheck the remote server nothing is done, any sugestions pls
> Seems you forgot to attach the script you wrote.
>
> ...and when you send it, please also tell us as which user you call it
> and how your whole crontab looks like. (Some variables may be set there.)
>
> MfG, JBG
>
yep:) thanks for your help
I found the script in a tutoriel and made some changes to it.
the 2 machines are Debian boxes 6.0
#crontab -e
# m h dom mon dow command
*/5 * * * * root /usr/bin/backup.sh
# cat /etc/crontab
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / &&
run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / &&
run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / &&
run-parts --report /etc/cron.monthly )
#
cron.log
Mar 13 17:10:01 debian /USR/SBIN/CRON[21083]: (root) CMD (root
/usr/bin/backup.sh)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: backup.sh.txt
URL:
<http://lists.samba.org/pipermail/rsync/attachments/20110313/b3e0374d/attachment.txt>