LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-31-2007, 06:01 PM   #1
jimmyjiang
Member
 
Registered: Jun 2006
Posts: 132

Rep: Reputation: 15
Rsync server with ssh transport !


hi,
I just setup a rsync server (2.6.3) with ssh and copy client's id_rsa.pub to server's authorized_keys file( so don't need password). the ssh transport has errors like this:

[backup@localhost ~]$ rsync -avz --rsh="ssh -l backup" test1 backup@192.168.1.189::backup
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(359)

backup is both my client/server user account ,join in users group.

my rsyncd.conf file:

uid = backup
gid = backup

log file = /etc/rsyncd.log

[svn]
path = /svn
comment = Svn Data Backup Directory
auth users = backup, root
secrets file = /etc/rsyncd.secrets

[backup]
path = /backup
comment = Svn Data Backup Directory
auth users = backup, root
secrets file = /etc/rsyncd.secrets


my rsyncd.secrets file :

backup:1234
root:3453
 
Old 02-03-2007, 02:16 AM   #2
jonwatson
Member
 
Registered: Jun 2004
Location: Nova Scotia, Canada!
Distribution: Ubuntu
Posts: 170

Rep: Reputation: 30
I use rsync in a totally different way so I'm not all that familiar with how you're using it. However, the backup@192.168.1.189::backup line looks wrong to me. I would expect a path after the login@address portion. Something like:

root@192.168.1.19:/backup

But that may be specific to my use.
 
Old 02-05-2007, 03:26 PM   #3
jimmyjiang
Member
 
Registered: Jun 2006
Posts: 132

Original Poster
Rep: Reputation: 15
yes, that work but at rysc manual you will find:

USING RSYNC-DAEMON FEATURES VIA A REMOTE-SHELL CONNECTION
It is sometimes useful to use various features of an rsync daemon (such as named modules) without actually allowing any new socket connections into
a system (other than what is already required to allow remote-shell access). Rsync supports connecting to a host using a remote shell and then
spawning a single-use "daemon" server that expects to read its config file in the home dir of the remote user. This can be useful if you want to
encrypt a daemon-style transfer’s data, but since the daemon is started up fresh by the remote user, you may not be able to use features such as
chroot or change the uid used by the daemon. (For another way to encrypt a daemon transfer, consider using ssh to tunnel a local port to a remote
machine and configure a normal rsync daemon on that remote host to only allow connections from "localhost".)

From the user’s perspective, a daemon transfer via a remote-shell connection uses nearly the same command-line syntax as a normal rsync-daemon
transfer, with the only exception being that you must explicitly set the remote shell program on the command-line with the --rsh=COMMAND option.
(Setting the RSYNC_RSH in the environment will not turn on this functionality.) For example:

rsync -av --rsh=ssh host::module /dest

If you need to specify a different remote-shell user, keep in mind that the user@ prefix in front of the host is specifying the rsync-user value
(for a module that requires user-based authentication). This means that you must give the ’-l user’ option to ssh when specifying the remote- shell, as in this example that uses the short version of the --rsh option:

rsync -av -e "ssh -l ssh-user" rsync-user@host::module /dest

The "ssh-user" will be used at the ssh level; the "rsync-user" will be used to log-in to the "module".

so I tried it , but it never work!
 
Old 03-29-2012, 03:01 AM   #4
yashvanth
LQ Newbie
 
Registered: Mar 2012
Posts: 23

Rep: Reputation: Disabled
Post rsync server setup help required

hi
can anyone tell me the complete procedure to setup the rsync server.
currently installed with rsync and running it to take backup locally
now want to try backing up the local directories into remote system so please help me out to solve this issue
 
Old 03-29-2012, 03:07 AM   #5
descendant_command
Member
 
Registered: Mar 2012
Posts: 845

Rep: Reputation: 187Reputation: 187
Code:
rsync [options] /path/to/source user@remotehost:/path/to/target
 
Old 03-29-2012, 03:15 AM   #6
yashvanth
LQ Newbie
 
Registered: Mar 2012
Posts: 23

Rep: Reputation: Disabled
Post re

you are telling the rsync srcipt to transfer the files remotely
but before that we should set up the rsync server and i need help in setting up the server
 
Old 03-29-2012, 03:19 AM   #7
descendant_command
Member
 
Registered: Mar 2012
Posts: 845

Rep: Reputation: 187Reputation: 187
Code:
aptitude install rsync
 
Old 03-29-2012, 04:25 AM   #8
yashvanth
LQ Newbie
 
Registered: Mar 2012
Posts: 23

Rep: Reputation: Disabled
Smile re

let me explain briefly
i insalled rsync on my local machine and taking the backup from one directory to other on same machine.
now i need to send the data from my local machine to remote machine using rsync and for that i need to set up rsync as an server over ssh.
i want help in setting up the rsync server.
 
Old 03-29-2012, 06:39 AM   #9
descendant_command
Member
 
Registered: Mar 2012
Posts: 845

Rep: Reputation: 187Reputation: 187
Well I don't know what distro you are running on your target, but that is all that is required on Debian.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rsync server vs rsync over ssh humbletech99 Linux - Networking 1 10-18-2006 01:10 PM
rsync over ssh mattsoftnet Linux - Software 2 06-02-2006 02:55 PM
rsync and ssh? IchBin Linux - Newbie 4 02-13-2005 04:41 PM
Rsync vs ssh satimis Linux - Software 7 04-04-2004 07:58 AM
Rsync and SSH Phaethar Linux - Software 3 03-22-2004 04:18 PM


All times are GMT -5. The time now is 11:23 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration