- Community Home
 - >
 - Servers and Operating Systems
 - >
 - Operating Systems
 - >
 - Operating System - HP-UX
 - >
 - Re: Please Help! I have problem rsync.
 
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
 - Entry Storage Systems
 - Legacy
 - Midrange and Enterprise Storage
 - Storage Networking
 - HPE Nimble Storage
 
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
 - Appliance Servers
 - Alpha Servers
 - BackOffice Products
 - Internet Products
 - HPE 9000 and HPE e3000 Servers
 - Networking
 - Netservers
 - Secure OS Software for Linux
 - Server Management (Insight Manager 7)
 - Windows Server 2003
 - Operating System - Tru64 Unix
 - ProLiant Deployment and Provisioning
 - Linux-Based Community / Regional
 - Microsoft System Center Integration
 
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
 - Mark Topic as New
 - Mark Topic as Read
 - Float this Topic for Current User
 - Bookmark
 - Subscribe
 - Printer Friendly Page
 
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
11-07-2011 02:28 AM
11-07-2011 02:28 AM
I have server 2 host OS version 11.23 and I use ssh autologin work.But I can't use command .it show detail below.
Please Help me.
clsmdb02:/etc # /usr/local/bin/rsync -vvvvv /home/testrsync/  root@sectdr01:/home/testrsync/
FILE_STRUCT_LEN=16, EXTRA_LEN=4
cmd=<NULL> machine=sectdr01 user=root path=/home/testrsync/
cmd[0]=ssh cmd[1]=sectdr01 cmd[2]=-l cmd[3]=root cmd[4]=rsync cmd[5]=--server cmd[6]=-vvvvve.sf cmd[7]=. cmd[8]=/home/testrsync/
opening connection using: ssh sectdr01 -l root rsync --server -vvvvve.sf . /home/testrsync/
note: iconv_open("HP-ROMAN8", "HP-ROMAN8") succeeded.
sh: rsync:  not found.
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
[sender] _exit_cleanup(code=12, file=io.c, line=605): entered
rsync error: remote command not found (code 127) at io.c(605) [sender=3.0.9]
[sender] _exit_cleanup(code=12, file=io.c, line=605): about to call exit(127)
clsmdb02:/etc #
Thank you.
Solved! Go to Solution.
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
11-07-2011 07:10 AM
11-07-2011 07:10 AM
			
				
					
						
							Re: Please Help! I have problem rsync.
						
					
					
				
			
		
	
			
	
	
	
	
	
The key seems to be this part of the output:
sh: rsync: not found.
Is rsync installed on the remote system? Does the symlink /usr/bin/rsync exist on the remote server?
Jeff Traigle
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
11-07-2011 07:31 AM
11-07-2011 07:31 AM
SolutionFrom the error messages, I think the rsync command is not in PATH for non-interactive logins on sectdr01.
When rsync uses SSH to establish a connection to sectdr01, it tells sshd to run the rsync command directly, without invoking a shell first. As a result, /etc/profile won't be run, and so the PATH variable won't be set according to /etc/PATH file. You will be left with the very rudimentary factory-default path assigned by sshd.
You can verify it like this:
clsmdb02:/ # ssh root@sectdr01 printenv PATH /usr/bin:/bin:/usr/sbin:/sbin:/opt/ssh/bin clsmdb02:/ # ssh root@sectdr01 sectdr01:/ # printenv PATH <a much longer list of directories, as listed in /etc/PATH>
As a workaround, you might make a symbolic link on sectdr01 to make the rsync command available to non-interactive sessions:
ln -s /usr/local/bin/rsync /usr/bin/rsync
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
11-07-2011 08:57 PM
11-07-2011 08:57 PM
			
				
					
						
							Re: Please Help! I have problem rsync.
						
					
					
				
			
		
	
			
	
	
	
	
	
Thank you. For all the suggestions. Now, I follow it.
On host it has rsync program.But not have link to /usr/bin/rsync. I follow them .
clsmdb02:/ # ln -s /usr/local/bin/rsync /usr/bin/rsync   <<<<<<<
clsmdb02:/ # /usr/bin/rsync -vvvvv /home/testrsync/  root@sectdr01:/home/testrsync/        <<<<<<<<
FILE_STRUCT_LEN=16, EXTRA_LEN=4
cmd=<NULL> machine=sectdr01 user=root path=/home/testrsync/
cmd[0]=ssh cmd[1]=sectdr01 cmd[2]=-l cmd[3]=root cmd[4]=rsync cmd[5]=--server cmd[6]=-vvvvve.sf cmd[7]=. cmd[8]=/home/testrsync/
opening connection using: ssh sectdr01 -l root rsync --server -vvvvve.sf . /home/testrsync/
note: iconv_open("HP-ROMAN8", "HP-ROMAN8") succeeded.
FILE_STRUCT_LEN=16, EXTRA_LEN=4
(Client) Protocol versions: remote=30, negotiated=30
(Server) Protocol versions: remote=30, negotiated=30
[sender] change_dir(/home/testrsync)
skipping directory .
[sender] flist start=0, used=0, low=0, high=-1
send_file_list done
file list sent
send_files starting
server_recv(2) starting pid=24496
received 0 names
[Receiver] flist start=0, used=0, low=0, high=-1
recv_file_list done
get_local_name count=0 /home/testrsync/
[Receiver] change_dir(/home/testrsync)
generator starting pid=24496
recv_files(0) starting
delta-transmission enabled
send_files phase=1
generate_files phase=1
recv_files phase=1
generate_files phase=2
send_files phase=2
send files finished
total: matches=0  hash_hits=0  false_alarms=0 data=0
recv_files phase=2
generate_files phase=3
recv_files finished
generate_files finished
client_run waiting on 9121
sent 8 bytes  received 12 bytes  40.00 bytes/sec
total size is 0  speedup is 0.00
[sender] _exit_cleanup(code=0, file=main.c, line=1052): entered
[sender] _exit_cleanup(code=0, file=main.c, line=1052): about to call exit(0)
Process End .
I remote to server2 and list directory.But not have file same server1 .What happen ?
On server2.
[root@sectdr01:/>#cd /home/
[root@sectdr01:/home>#cd testrsync
[root@sectdr01:/home/testrsync>#ls
oracle  test1
[root@sectdr01:/home/testrsync>#ls -l
total 0
drwxr-xr-x   2 root       sys             96 Nov  7 16:53 oracle
-rw-r--r--   1 root       sys              0 Nov  7 16:53 test1
[root@sectdr01:/home/testrsync>#cd oracle
[root@sectdr01:/home/testrsync/oracle>#ls
[root@sectdr01:/home/testrsync/oracle>#ls -l
total 0                                                                                  <<<<<<<<
[root@sectdr01:/home/testrsync/oracle>#
On server1.
clsmdb02:/ # cd /home/testrsync
clsmdb02:/home/testrsync # ls -l
total 32
drwxr-xr-x   8 root       sys           8192 Nov  7 16:50 oracle
-rw-r--r--   1 root       sys            103 Nov  7 16:48 test1
clsmdb02:/home/testrsync # more test1
test1;asldfjkdfkj;asd;jkladsf;lmnvxzcn;mlscjadsfh/.nsvcjksadfkldsfasfdjk'fd;lknasn;lmkvvasd;ljadsf;lkj
clsmdb02:/home/testrsync # ls -l oracle
total 688
-rw-------   1 root       sys            149 Nov  7 16:50 .Xauthority
-r--r--r--   1 root       sys            831 Nov  7 16:50 .cshrc
drwxr-xr-x   7 root       sys           8192 Nov  7 16:50 .dt
-rwxr-xr-x   1 root       sys           5451 Nov  7 16:50 .dtprofile
-r--r--r--   1 root       sys            347 Nov  7 16:50 .exrc
-r--r--r--   1 root       sys            333 Nov  7 16:50 .login
-rwxr-----   1 root       sys            601 Nov  7 16:50 .profile
-rw-------   1 root       sys          57868 Nov  7 16:50 .sh_history
drwx------   2 root       sys             96 Nov  7 16:50 .ssh
drwxr-x---   5 root       sys             96 Nov  7 16:50 .sw
-rw-------   1 root       sys              5 Nov  7 16:50 dead.letter
-rw-------   1 root       sys          16154 Nov  7 16:50 nohup.out
-rw-r--r--   1 root       sys         111388 Nov  7 16:50 perf_report.txt
-rwxr--r--   1 root       sys             70 Nov  7 16:50 restore_control.sh
-rw-r--r--   1 root       sys            158 Nov  7 16:50 restore_control.sql
-rwxr--r--   1 root       sys             65 Nov  7 16:50 restore_db.sh
-rw-r--r--   1 root       sys             98 Nov  7 16:50 restore_db.sql
drwxr-xr-x   2 root       sys           8192 Nov  7 16:50 scripts
-rw-r--r--   1 root       sys           2540 Nov  7 16:50 spauto.lis
-rw-r--r--   1 root       sys            195 Nov  7 16:50 spcpkg.lis
-rw-r--r--   1 root       sys           4159 Nov  7 16:50 spctab.lis
-rw-r--r--   1 root       sys           2622 Nov  7 16:50 spcusr.lis
drwxr-xr-x   2 root       sys             96 Nov  7 16:50 sql
-rw-r-----   1 root       sys            691 Nov  7 16:50 sqlnet.log
drwxr-xr-x   2 root       sys           8192 Nov  7 16:50 temp
-rw-r--r--   1 root       sys              0 Nov  7 16:50 testalert.log
clsmdb02:/home/testrsync #
Please Help me.
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
11-07-2011 09:13 PM
11-07-2011 09:13 PM
			
				
					
						
							Re: Please Help! I have problem rsync.
						
					
					
				
			
		
	
			
	
	
	
	
	
Thank you .For every body.
Now,I can use it.I follow below.
rsync -avz /home/testrsync/ root@sectdr01:/home/testrsync/
Thank you.