rsync not working thro' cron


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users rsync not working thro' cron
# 1  
Old 06-19-2008
Bug rsync not working thro' cron

Hi,
I am able to use rsync and run it thro' command line. But when I schedule a script file that has rsync command thro' cron, the job doesn't get executed. All other jobs in the cron runs fine.

cron entry--
Code:
57 13 * * * /home/apm/cron/rsync-backup.sh

rsync-backup.sh file--
Code:
rsync -avz --delete -e ssh2 /san/daily_exports/export/ test@sunny01:/san/daily_exports/export > /home/apm/cron/log


Last edited by Yogesh Sawant; 12-10-2010 at 06:10 AM.. Reason: added code tags
# 2  
Old 06-20-2008
No duplicate or cross-posting, read the rules.

Proceed here:

https://www.unix.com/unix-dummies-que...-rh-linux.html

Thread closed.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script not working in cron but working fine manually

Help. My script is working fine when executed manually but the cron seems not to catch up the command when registered. The script is as follow: #!/bin/sh for file in file_1.txt file_2.txt file_3.txt do awk '{ print "0" }' $file > tmp.tmp mv tmp.tmp $file done And the cron... (2 Replies)
Discussion started by: jasperux
2 Replies

2. Shell Programming and Scripting

Script is not working from cron while working manually

Hello, I am facing a very strange problem when I run my script manuallu ./Fetchcode which is using to connect with MKS integrity from linux end it workks fine but when I run it from cron it doesn't work.Can someone help me 1) How could I check my script when it is running from cron like... (3 Replies)
Discussion started by: anuragpgtgerman
3 Replies

3. UNIX and Linux Applications

Rsync works in shell but not in cron

So I have this rsync script I wrote to grab some sql files and import them to a database. I left in the mysql stuff just give context to the situation. The real problem is with my rsync code. script.sh (chmod 744) #!/bin/sh rsync -av --rsh="sshpass -p'PASSWORD' ssh -l'USERNAME'"... (3 Replies)
Discussion started by: noPermissions
3 Replies

4. Red Hat

rsync not working

I have tried rsync command as shown below, (if directory doesn't not exist on destination, i needs to create directories and sub directories through rsync at the destination server.) Note: Here /thaks/new/28/ directories doesn't exists on destination, How to create this on destination via rsync... (1 Reply)
Discussion started by: thakshina
1 Replies

5. UNIX for Dummies Questions & Answers

Problems using rsync with cron

Hi, I've created a cron job for a script with a rsync command in it. The script is named pull.sh and contains the following line : What it is supposed to do is pull backup files from the production server of my company to my local server. It should also generate the log file (output.log)... (1 Reply)
Discussion started by: anaigini45
1 Replies

6. UNIX for Dummies Questions & Answers

rsync not working thro' cron -RH Linux

Hi, I am able to use rsync and run it thro' command line. But when I schedule a script file that has rsync command thro' cron, the job doesn't get executed. All other jobs in the cron runs fine. cron entry-- 57 13 * * * /home/apm/cron/rsync-backup.sh rsync-backup.sh file-- rsync -avz... (1 Reply)
Discussion started by: sm23328
1 Replies

7. Shell Programming and Scripting

Rsync script in cron from stepping on itself

I have the following rsync script that I use for syncing MySQL files from one server to another. I run the script at 20 minutes past every second hour in cron. I want to make sure that the script completes in it's entirety before it is set to kick off again. For example, when the script starts at... (3 Replies)
Discussion started by: sunsysadm2003
3 Replies

8. UNIX for Advanced & Expert Users

Rsync via cron

Hi, I am running a rsync via cron job. Its running fine and is scheduled to 9:00 AM everyday. Sometimes it runs for more than 24 hours, such that the next days cron also fires. Now how will the sync happen as the <sync file> that both crons have created might conflict. Thanks (5 Replies)
Discussion started by: vibhor_agarwali
5 Replies

9. UNIX for Dummies Questions & Answers

use rsync by cron

Hi there: I run rsync very well by typing: rsync -avz /source /destination Then I want to run it by cron. So I had a crontab file like this: * * * * * rm file * * * * * rsync -avz /source /destination > cron_result (The first line is used to test whether cron is working.) When I check... (0 Replies)
Discussion started by: Steven.surfboy
0 Replies

10. UNIX for Dummies Questions & Answers

Rsync not working :(

Hi all, I installed Rsync on my Solaris 8 but when I ran it, it returns ld.so.1: ./rsync: fatal: libpopt.so.0: open failed: No such file or directory Killed Please help. Thanks. (3 Replies)
Discussion started by: stancwong
3 Replies
Login or Register to Ask a Question