rsync architecture

Jignesh Shah jignesh.shah1980 at gmail.com
Mon Dec 15 04:44:20 GMT 2008


Hi All,

I am trying to see the rsync source code. I could see that there are main
three processes: I realize that Server or Client becomes Sender or Receiver
based on arguments provided.

 1. Daemon
      start_daemon : clientserver.c
 2. Server
         if(sender) {
              call recv_filter_list : exclude.c
              call send_file_list : flist.c
              call send_files     : sender.c
          } else {
             call recv_filter_list : exlude.c
             call recv_file_list   : flist.c
             call do_recv : main.c
             call recv_files : receiver.c
             call generate files : generator.c
        }
 3. Client
     call do_cmd     : main.c
     call client_run  : main.c
     if(sender) {
              call send_filter_list : exclude.c
              call send_file_list : flist.c
              call send_files     : sender.c
          } else {
             call send_filter_list : exclude.c
             call recv_file_list   : flist.c
             call do_recv : main.c
             call recv_files : receiver.c              call generate files :
generator.c
         }

I have noticed that deamon process will start only if am_daemon argument
provided. My questions are

1. What is the roll of deamon process. How it different from server? Does it
run always on remote machine? When I do rsync from client how remote
deamon/server will get triggered?
2 .Where the arguments are being set. I cannot see any of arguments(like
am_server, am_deamon etc) is being set anywhere.

Please help me on this so that I can proceed.

Thanks,
Jignesh
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the rsync mailing list