Help Needed on RSYNC


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help Needed on RSYNC
# 1  
Old 02-20-2015
Help Needed on RSYNC

My Script as below

Code:
#######
#!/usr/bin/ksh
DIR=$1
MN=`echo $1 | awk -F'/' '{print $NF}'`
LF=./rsynclog
RSYNC=/usr/local/bin/rsync

mv $LF.$MN $LF.$MN.prev
compress $LF.$MN.prev

$RSYNC -arz --rsync-path=$RSYNC  --log-file=$LF.$MN  SERVER1:$DIR/ $DIR

While running it I am getting error::


Code:
2015/02/19 12:30:01 [13009] rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
2015/02/19 12:30:01 [13009] rsync error: error in rsync protocol data stream (code 12) at io.c(453) [receiver=2.6.9]

Both Source and Destination server has the same protocal version.

rsync version 2.6.9 protocol version 29

Any help, would really appreciate.

Last edited by Scrutinizer; 02-20-2015 at 12:33 AM.. Reason: code tags
# 2  
Old 02-21-2015
Please check :

1. rsync path on both servers is /usr/local/bin/rsync
2. user which is doing the rsync can write to $DIR
3. user is able to SSH to SERVER1
4. firewall configuration if any on both ends.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help Needed for creating the folder by checking today's date and, take backup using rsync command

How to create a shell script to create a folder by using the today's date to take backup using rsync command on every evening around 7 pm. Kindly help. Thanks. To be more precise, I want to create a script which matches the today's date with server's date format, if matches then creates the... (2 Replies)
Discussion started by: bakula10
2 Replies

2. Shell Programming and Scripting

Rsync Error: rsync: link_stat failed: No such file or directory (2)

I wish to copy all the files & folder under /web/Transfer_Files/data/ on mymac1 (Linux) to remote server mybank.intra.com (Solaris 10) /tmp/ location I am using Ansible tool synchronize module which triggers the unix rsync command as below:rsync --delay-updates -F --compress --archive --rsh=ssh... (2 Replies)
Discussion started by: mohtashims
2 Replies

3. Shell Programming and Scripting

Need help on rsync

Hi experts, We need copy 5TB data from one server to another (over a 10Gbps link). We plan to use rsync -av remote:/<path /local on destination server but there're few special requirements like: 1. data copy process should run only from 18:00 Hrs to 07:00 every day until copy is completed. Is... (1 Reply)
Discussion started by: magnus29
1 Replies

4. Shell Programming and Scripting

Help needed with Content synchronization script using rsync

Hi All, I need a .sh script which serves the below purpose. It would be of great help. I am unable to perform the second need of mapping texts within the file and updating only those contents. For Eg: There is a html file containing link abc.com. This should be replaced with xyz.com link in... (3 Replies)
Discussion started by: Amulya
3 Replies

5. Shell Programming and Scripting

rsync

Am I correct in assuming that the following command: rsync -a /a /b does not make any changes on /a if there are files on /b that are newer (2 Replies)
Discussion started by: jgt
2 Replies

6. Shell Programming and Scripting

Help needed for rsync

How can i combine the below two rsync commands into one: rsync -auvL --delete /etc /usr/local/MediaServer /mnt/bak/livecore/filesystem.0 > /tmp/backup_log/rsync.log 2>&1 and rsync -auv --delete --exclude='live/public_html/video' --exclude='live/public_html.old' /var/www... (0 Replies)
Discussion started by: proactiveaditya
0 Replies

7. Shell Programming and Scripting

rsync

hi there I wonder if some-one can help. I am trying to use rsync on my mac to transfer a folder to a remote machine. I have logged into rysnc on my mac no problem and I'm trying to execute this command: rsync -a -e ssh /Users/myname/myfolder/sourcefolder/... (3 Replies)
Discussion started by: volterony
3 Replies

8. UNIX for Dummies Questions & Answers

rsync

i last night i copied a 400GB folder using rsync and ssh i did: rsync -r /mnt/500_GB ssh miguel@192.168.1.3:/mnt/1500_GB and it copied the folder fine all 400GB. The question is: If i put more files to that initial 400GB folder, which command can i run on my server for it to update the... (4 Replies)
Discussion started by: supermiguel
4 Replies

9. Solaris

please help in rsync

Dear all, I m trying to rsync a file remotely but it is throwing following error. #/opt/sfw/bin/rsync -v -a -e ssh user@xx.xx.xx.xx:/export/home/naresh/utils.sh bash: rsync: command not found rsync: connection unexpectedly closed (0 bytes read so far) rsync error: error in... (10 Replies)
Discussion started by: naree
10 Replies

10. UNIX for Dummies Questions & Answers

rsync vs cp

Hi guys, I will be copying data from one FS to another. (only once) These are local Filesystems... Which tool would be more efficient to use in this case? There is a huge amount of data that needs to be copied... (1.5TB) John (1 Reply)
Discussion started by: jsy
1 Replies
Login or Register to Ask a Question