You are not logged in.
I recently tried to setup cron to run rsync my /home to my old harddrive. I made a script in /etc/cron.daily as follows:
18 0 * * * rsync -ar --delete /home/comhack/Videos /home/comhack/Music /mnt/backup/Backup &> /dev/null
Well after restarting cron it would not work. So I used crontab to add the cron job:
bash-3.2# crontab -l
#!/bin/bash
18 0 * * * rsync -ar --delete /home/comhack/Videos /home/comhack/Music /mnt/backup/Backup &> /dev/null
Well when I do that it shows 2 processes in top:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
8343 root 20 0 32920 1716 400 R 33 0.0 0:20.49 rsync
8341 root 20 0 30032 2172 748 S 27 0.1 0:15.89 rsync
Also, /var/log/crond shows only one process started:
08-Apr-2009 00:18 FILE /var/spool/cron/root USER root pid 8340 cmd rsync -ar --delete /home/comhack/Videos /home/comhack/Music /mnt/backup/Backup &> /dev/null
Any ideals?
Last edited by securitybreach (2009-06-14 10:42:10)
"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website Configs
Forum Admin: Bruno's All Things Linux
securitybreach<a>archlinux.us
Offline
You don't need a bang line (#!/bin/bash) in your crontab file. This might be confusing it and executing your crontab, then cron executing the contents of your crontab if that makes sense...
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Thanks
"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website Configs
Forum Admin: Bruno's All Things Linux
securitybreach<a>archlinux.us
Offline
I take it that worked? If so, can you edit your original post and mark as solved please to help other in the future searching for similar problems?
Last edited by fukawi2 (2009-04-08 22:38:46)
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
No it still shows two processes. Thanks for the reminder though, I always mark solved if solved.
THanks
Last edited by securitybreach (2009-04-08 23:03:51)
"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website Configs
Forum Admin: Bruno's All Things Linux
securitybreach<a>archlinux.us
Offline
Interesting... IIRC, rsync itself sometimes seems to spawn a child process. When they're both running, press 'c' in top and see if they're running with the same or different command line options...
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Thanks doing now.
Thanks
"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website Configs
Forum Admin: Bruno's All Things Linux
securitybreach<a>archlinux.us
Offline