Help On RSYNC SCRIPTING


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

My Script as below

#######
#!/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::



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.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

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

2. UNIX for Dummies Questions & Answers

rsync

Hi all, I'm new to the rsync world in hpux. Currently I have rsync going through the main public lan, but dude to traffic loads, I have been told that i need to use a dedicated rsync lan. I currently have 4 spare nics and the plan was to use one of these for the rsync, but I can't figure out... (2 Replies)
Discussion started by: linuxwanabe
2 Replies

3. UNIX for Dummies Questions & Answers

Rsync Help?

Hi everyone, I'm pretty new to rsync and I've been tasked to "fix" an existing .sh to make it work the way I need it to. I have the following rsync set up on a cron job: /usr/local/bin/rsync --stats -qPzrtpl --delete --password-file=/var/run/.appprodrsync ... (2 Replies)
Discussion started by: Russell P
2 Replies

4. Web Development

Perl scripting or shell scripting?

i am going to study any one of the scripting languages mentioned above(shell 0r perl scripting) . Which is having more scope for a fresher? (1 Reply)
Discussion started by: Anna Hussie
1 Replies

5. What is on Your Mind?

Shell Scripting vs Perl scripting

Gents, I have been working in a Solaris/Unix environment for about 9 months. I took some linux classses online before getting the job. But, I am not very good at scripting. I want to learn how to script. Do you think that I should start with Shell scripting or Perl? I wanted to continue with... (2 Replies)
Discussion started by: Pouchie1
2 Replies

6. What is on Your Mind?

Shell scripting vs Perl scripting

Hi all, I would like to start developping some good scripting skills. Do you think it would be best to start with shell scripting or Perl? I already got a fundation, really basics, in perl. but I am wondering what would be best to be good at first. Can you please help me determine which one to... (14 Replies)
Discussion started by: Pouchie1
14 Replies

7. Shell Programming and Scripting

Call Shell scripting from Perl Scripting.

Hi How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies

8. Shell Programming and Scripting

another need for help in scripting (rsync)

Hi all! Ok, so, here is what i need... I need to rsync two folders ("orig_folder" and "sync_folder"), every night (starting at 2.30 am). Since the "orig_folder" has much more space, i need to sync ONLY "latest" files/folders, that are all together "only 120 GB" big... Since i think, the... (1 Reply)
Discussion started by: simko_ba
1 Replies

9. Shell Programming and Scripting

scripting guru's pls help me with scripting on AIX

can someone pls help me with the script for a files coming from one system to a particular directory and i want to write a script to move those files to another directory on different system by renaming the files... pls someone help me on this... thanking in anticipation.... (1 Reply)
Discussion started by: thatiprashant
1 Replies
Login or Register to Ask a Question
shells(4)							   File Formats 							 shells(4)

NAME
shells - shell database SYNOPSIS
/etc/shells DESCRIPTION
The shells file contains a list of the shells on the system. Applications use this file to determine whether a shell is valid. See getuser- shell(3C). For each shell a single line should be present, consisting of the shell's path, relative to root. A hash mark (#) indicates the beginning of a comment; subsequent characters up to the end of the line are not interpreted by the routines which search the file. Blank lines are also ignored. The following default shells are used by utilities: /bin/bash, /bin/csh, /bin/jsh, /bin/ksh, /bin/pfcsh, /bin/pfksh, /bin/pfsh, /bin/sh, /bin/tcsh, /bin/zsh, /sbin/jsh, /sbin/sh, /usr/bin/bash, /usr/bin/csh, /usr/bin/jsh, /usr/bin/ksh, /usr/bin/pfcsh, /usr/bin/pfksh, /usr/bin/pfsh, and /usr/bin/sh, /usr/bin/tcsh, /usr/bin/zsh. Note that /etc/shells overrides the default list. Invalid shells in /etc/shells may cause unexpected behavior (such as being unable to log in by way of ftp(1)). FILES
/etc/shells lists shells on system SEE ALSO
vipw(1B), ftpd(1M), sendmail(1M), getusershell(3C), aliases(4) SunOS 5.10 4 Jun 2001 shells(4)