You are not logged in.

#1 2009-04-08 04:22:06

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

SOLVED sorta-Rsync cron/crontab 2 Processes?

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

#2 2009-04-08 05:24:19

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: SOLVED sorta-Rsync cron/crontab 2 Processes?

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...

Offline

#3 2009-04-08 13:26:00

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

Re: SOLVED sorta-Rsync cron/crontab 2 Processes?

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

#4 2009-04-08 22:38:29

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: SOLVED sorta-Rsync cron/crontab 2 Processes?

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? smile

Last edited by fukawi2 (2009-04-08 22:38:46)

Offline

#5 2009-04-08 23:01:26

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

Re: SOLVED sorta-Rsync cron/crontab 2 Processes?

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

#6 2009-04-08 23:12:24

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: SOLVED sorta-Rsync cron/crontab 2 Processes?

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...

Offline

#7 2009-04-08 23:14:12

securitybreach
Member
From: In front of my computers
Registered: 2007-11-18
Posts: 416
Website

Re: SOLVED sorta-Rsync cron/crontab 2 Processes?

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

Board footer

Powered by FluxBB