DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2009-07-11 03:16:51

thamch
Member
Registered: 2008-09-23
Posts: 15

Rsync not working when schedule via crontab

I wanted to rsync from my DLink DNS323 NAS to Intel SS4000-E NAS.
I had configure all the necessary certificate and it is working properly.

When I run the rsync via the DNS323 telnet session and it works perfectly.
Here is the parameter:
/mnt/HD_a2/ffp/bin/rsync -rlptDv --delete -e ssh /mnt/HD_b2/ root@192.168.34.211:/nas/NASDisk-00008/SyncNAS/

This is the parameter I schedule it via crontab.  I did tried using the -u root command too.
45 3 * * * /mnt/HD_a2/ffp/bin/rsync -rlptDv --delete -e ssh /mnt/HD_b2/ root@192.168.34.211:/nas/NASDisk-00008/SyncNAS/ > /mnt/HD_a2/ffp/log/rsync.intel.last.log 2>&1

And here is the error from the rsync.intel.last.log
rsync: Failed to exec ssh: No such file or directory (2)
rsync error: error in IPC code (code 14) at pipe.c(84) [sender=3.0.5]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in IPC code (code 14) at io.c(600) [sender=3.0.5]

Please suggest any solution to make rsync work via crontab.


DLink DNS-323 w ffp 0.7
FW : 1.09

Offline

 

#2 2009-07-11 10:36:32

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Rsync not working when schedule via crontab

put the rsync command in a script, and run the script from cron. in the script, first set PATH=/ffp/sbin:/ffp/bin:$PATH

Offline

 

#3 2009-07-13 10:06:43

thamch
Member
Registered: 2008-09-23
Posts: 15

Re: Rsync not working when schedule via crontab

Problem resolved by giving pull path to the SSH
45 3 * * * /mnt/HD_a2/ffp/bin/rsync -rlptDv --delete -e /mnt/HD_a2/ffp/bin/ssh /mnt/HD_b2/ root@192.168.34.211:/nas/NASDisk-00008/SyncNAS/ > /mnt/HD_a2/ffp/log/rsync.intel.last.log 2>&1


DLink DNS-323 w ffp 0.7
FW : 1.09

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB