Akshay Patil
Akshay Patil

Reputation: 970

rsync in non-daemon

I want to know how rsync works in non-daemon mode ,and what it is exactly ?

From rsync man pages , I came to know how daemon mode works . I know something about daemon mode. Daemon is a process continuously listening for connections in background.

Now , the scene is ,I don't want to use Daemon mode ,as it will require some dedicated port always to be in listening.

I want to know,how does the client(say, local machine) in non-daemon mode technically invokes the rsync listener on server(say,remote machine) and vice versa? The reason for this approach is that , *I don't want client should know the port number of server before-hand * . Any detail explanations will be appreciated.

Upvotes: 1

Views: 2804

Answers (3)

Akshay Patil
Akshay Patil

Reputation: 970

This answers my question :

I found out how it invokes remote rsync in non-daemon mode. on Local side : if command is :- rsync -avz -e ssh remoteuser@remotehost:/remote/dir /this/dir/ this command will starts another process on the local side as :- ssh -l remoteuser 192.168.xx.xxx -vlogDtprze.iLsf . /remote/dir

This ssh command invokes rsync on remote on remote box as : rsync --server -vlogDtprze.iLsf . /remote/dir/

and starts with arbitrary port no. but data communication occurs over ssh (port 22 needs to be open).

Upvotes: 2

Satish
Satish

Reputation: 17417

Its call rsync over ssh in that case you don't need to run daemon

Upvotes: 0

perreal
perreal

Reputation: 97948

From rsync man-page:

There are two different ways for rsync to contact a remote system: using a remote-shell program as the transport (such as ssh or rsh) or contacting an rsync daemon directly via TCP.

So in non-deamon mode you can use ssh to connect and update your clients. In this case the initial connection through ssh will setup the client side so that rsync can connect without knowing the port number.

Upvotes: 1

Related Questions