Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member trakwebster's Avatar
    Join Date
    Jan 2003
    Posts
    145

    Default rsync gurus -- how to stop rsync daemon?

    I've been very happily using rsync to make periodic backups of my server to an office machine. I decided that, since it worked so nicely, I would also use it in the other direction, to back up an office 'library' directory to my server, so as to have an off-site safety backup of our office files.

    Because our office machines sit behind a firewall, I do not have the skills to have the server call in through the firewall, so I wanted the script to run on the office machine. It appeared to fail, and then I noticed that rsync can run in a daemon mode, so I started up the rsync daemon on my server ('rsync --daemon'), and then with just a little tinkering created a script that ran on the office machine and copied the desired files onto the desired directory on the server. So far, so good.

    Now, when I am done with this action, I do not want to leave the rsync daemon running. It just goes against my grain, because it could be insecure. However, searching the rsync documentation as best I can, I cannot find any flag that stops the daemon.

    Does anybody know what the correct command would be? Or can anybody confirm that there is no such command, and in that case, please advise me of the kindest way to close a running daemon in general?

    I did a search here, but the subject appears never to have arisen before. I would be very grateful for any assistance.
    -- Arthur Cronos from Voltos
    =================================================
    The Bloggard, Un Hombre Muy Blogisto -- http://www.bloggard.com
    Your loch ness monster, your yeti, your bigfoot. Bah! I've seen worse.
    =================================================

  2. #2
    Member
    Join Date
    Aug 2002
    Posts
    1,052

    Default

    You really shouldn't daemonize something that you don't want to run all the time. You can easily call rsync from a bash script, etc. If you want to daemonize it, there's plenty of ways to kill the process off using signals--it just depends on how nice you want to be to the process.

    You can use "killall -SIGTERM process_name" or "killall -SIGKILL process_name" on some systems you can use "killproc process_name".

    cPanel.net Support Ticket Number:

    The rest of those who have gone before us cannot steady the unrest of those to follow.

  3. #3
    Member trakwebster's Avatar
    Join Date
    Jan 2003
    Posts
    145

    Default You're right -- daemon not needed!

    Although my first experiments suggested that the script running on office machine could not initiate file transfer into remote server, I was mistaken.

    Using your suggestion I successfully killed the daemon process (verified with ps -aux), and then retried the office machine script which had been successful when remote daemon was running.

    This script worked fine. On the remote server, the rsync process started up. ps -aux reveals that rsync is running on the remote server as 'rsync --server -v', and all is delightful.

    For the benefit of anybody in this same situation, the script which runs on the local office machine looks like this --

    rsync --rsh=ssh --archive --delete --verbose --progress --stats /officemachinedirectory/* root@11.22.33.44:/remotedirectory/

    cyphervendor, thanks for your help.

    Last edited by trakwebster; 08-12-2003 at 11:25 AM.
    -- Arthur Cronos from Voltos
    =================================================
    The Bloggard, Un Hombre Muy Blogisto -- http://www.bloggard.com
    Your loch ness monster, your yeti, your bigfoot. Bah! I've seen worse.
    =================================================

Similar Threads & Tags
Similar threads

  1. Enhanced rsync backup, daemon support
    By uhhosting in forum Feature Requests for cPanel/WHM
    Replies: 20
    Last Post: 11-11-2011, 11:17 AM
  2. Replies: 2
    Last Post: 04-28-2011, 07:36 AM
  3. rsync
    By cris_72 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-27-2007, 04:18 AM
  4. rsync://rsync.cpanel.net broken?
    By Sinewy in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 10-26-2004, 06:08 AM
  5. Replies: 0
    Last Post: 01-25-2004, 04:02 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube