LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-14-2009, 08:55 AM   #16
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49

I just looked in the var/log/cron and it has the following

Jul 14 02:05:01 svr01 crond[22729]: (user) CMD (rsync -r -a -p --delete /data1/stuff /data2/stuffbackup/)


so does that mean it ran? or is it still running and just hasn't deleted anything yet maybe?
 
Old 07-14-2009, 08:57 AM   #17
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by rjo98 View Post
I just looked in the var/log/cron and it has the following

Jul 14 02:05:01 svr01 crond[22729]: (user) CMD (rsync -r -a -p --delete /data1/stuff /data2/stuffbackup/)


so does that mean it ran? or is it still running and just hasn't deleted anything yet maybe?
it ran.
is it still running?? i doubt, but check.

Code:
pgrep rsync

or
Code:
ps ax | grep rsync
 
Old 07-14-2009, 08:59 AM   #18
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
that first line returned nothing

the 2nd line returned
3752 pts/0 S 0:00 grep rsync
 
Old 07-14-2009, 09:02 AM   #19
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by rjo98 View Post
that first line returned nothing

the 2nd line returned
3752 pts/0 S 0:00 grep rsync
it is not running then.
and so shouldnt be considering the cron fires up at 0205hrs on the given days

Code:
day of week    0-7 (0 or 7 is Sun, or use names)

man 5 crontab
 
Old 07-14-2009, 09:14 AM   #20
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
So should i just update the path in the crontab then and rerun it? I'm not sure why it would just stop working.
 
Old 07-14-2009, 09:41 AM   #21
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by rjo98 View Post
So should i just update the path in the crontab then and rerun it? I'm not sure why it would just stop working.
it looks to me like it is running fine.

can u do me a favour and paste the contents of crontab here


hint

Code:
crontab -l
 
Old 07-14-2009, 09:48 AM   #22
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
just to try it I ran the rsync statement manually and got the following

opendir(stuff/music): Permission denied
IO error encountered - skipping file deletion
rsync error: some files could not be transferred (code 23) at main.c(620)


Maybe something got jacked up with permissions and that's the problem?
 
Old 07-14-2009, 10:29 AM   #23
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
Actually when I try to run it as the user who has the crontab'd rsync, i get the following

rsync: writefd_unbuffered failed to write 4092 bytes: phase "send_file_entry": Broken pipe
rsync error: error in rsync protocol data stream (code 12) at io.c(515)
 
Old 07-14-2009, 10:33 AM   #24
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by rjo98 View Post
Actually when I try to run it as the user who has the crontab'd rsync, i get the following

rsync: writefd_unbuffered failed to write 4092 bytes: phase "send_file_entry": Broken pipe
rsync error: error in rsync protocol data stream (code 12) at io.c(515)

sounds like permissions problem
 
Old 07-14-2009, 10:33 AM   #25
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
Putting the /usr/bin/ in front of rsync produced the same results as my last post FYI
 
Old 07-14-2009, 10:38 AM   #26
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by rjo98 View Post
Putting the /usr/bin/ in front of rsync produced the same results as my last post FYI
i said already that the command IS running.

the problem is this

Code:
opendir(stuff/music): Permission denied
make sure that user has permissions to open the stuff/music directory or run this crontab as a user that IS allowed to do this
 
Old 07-14-2009, 10:39 AM   #27
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
When I look at my stuff folder i see the following

dr-xr-x--- 21 user grp 4096 Jul 9 11:07 stuff

When i look at stuffbackup i see

drwxrwxr-x 3 user grp 4096 Jun 18 09:05 stuffbackup


the crontab is under the user's crontab, so shouldn't it be ok? permissions aren't my strong suit. actually, linux isn't my strong suit, yet! haha
 
Old 07-14-2009, 10:41 AM   #28
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by rjo98 View Post
When I look at my stuff folder i see the following

dr-xr-x--- 21 user grp 4096 Jul 9 11:07 stuff

When i look at stuffbackup i see

drwxrwxr-x 3 user grp 4096 Jun 18 09:05 stuffbackup


the crontab is under the user's crontab, so shouldn't it be ok? permissions aren't my strong suit. actually, linux isn't my strong suit, yet! haha
grrr...


w is missing

should read

Code:
drwxr-x---   21 user   grp       4096 Jul  9 11:07 stuff
so..

Code:
chmod u+w stuff(/music)
 
Old 07-14-2009, 10:43 AM   #29
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
so I even need to have the w for the source directory even though this user account is just used for the cron jobs?
 
Old 07-14-2009, 10:49 AM   #30
anon091
Senior Member
 
Registered: Jun 2009
Posts: 1,795

Original Poster
Rep: Reputation: 49
I went to manually run it switched over to the user who has the crontab, and now its just at

opendir(stuff/music): Permission denied
IO error encountered - skipping file deletion


but didn't give that third line that it did earlier. does that mean its actually running this time since it didn't give that 3rd line?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to see that crontab is running or not. nirmalraja Linux - General 1 11-23-2006 02:30 AM
can't understand rsync's behavior at all baronsam Linux - Software 5 08-15-2006 01:46 PM
crontab jobs aren't running mdm_linux Linux - General 4 05-30-2005 12:27 PM
Running ssh from crontab cmfarley19 Linux - Software 1 01-23-2004 08:24 AM
Old Crontab still Running vwaldoguy Linux - Software 3 08-05-2003 02:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration