francobatera
(usa Ubuntu)
Enviado em 24/09/2014 - 12:37h
Ok, assim está o script bkp.sh:
#arquivos do Servidor
mount -t cifs -o username=usuario,password=******,uid=1000 //192.168.0.105/d /mnt/serverWIN/
rsync -Cvrazup --delete /mnt/serverWIN/arquivos/ /home/servidor
umount /mnt/serverWIN
#Arquivos da Claudia
mount -t cifs -o username=usuario,password=******,uid=1000 //192.168.0.117/Documentos /mnt/serverWIN
rsync -Cvrzuo /mnt/serverWIN /home/claudia/documentos
umount /mnt/serverWIN
e o meu crontab está assim
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
39 * * * * 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 )
*/1 * * * * root bash bkp.sh 1>/bin/bkp.txt 2>/bin/bkperro.txt
#
as observações são as seguintes:
o arquivo bkp.sh roda normalmente se eu tentar executar manual
ele está salvo dentro do diretorio bin...
abraço.