Rsync syntax issues - Tools

This is a discussion on Rsync syntax issues - Tools ; I have several rsync servers on Windows machines in remote offices. Several times a day a Linux server at our central office "polls" these remote office servers and synchronizes several directories. Recently we've expanded this functionality significantly and I've run ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Rsync syntax issues

  1. Rsync syntax issues

    I have several rsync servers on Windows machines in remote offices.
    Several times a day a Linux server at our central office "polls" these
    remote office servers and synchronizes several directories. Recently
    we've expanded this functionality significantly and I've run into
    issues. On the remote rsync servers we have a "rsync.conf" that looks
    like:

    use chroot = false
    strict modes = false
    max connections = 2
    hosts allow = xxx.xxx.xxx.xxx #where x is our central IP address
    lock file = rsyncd.lock
    log file = rsyncd.log
    pid file = rsyncd.pid
    timeout = 600
    refuse options = h i c a

    [upload]
    comment = Regular remote office file sync
    path = /cygwin/c/upload
    exclude from = exclude_list
    read only = false
    transfer logging = yes

    ....the filesystem is a simple directory "upload" that has several files
    and sub-directories that I want to copy to the central office. The
    "exclude_list" file only has one line in it:

    " - /trash* "

    ....to exclude a series of sub-directories that I do not want to copy.
    On the server at the central office I have a daemon that runs 24 hours
    a day and contacts these rsync servers every 3 hours or so to check for
    any updates. Inside of the daemon script I use the following
    statement:

    rsync -rvvv remote_rsync_server::upload /central_server/datafiles/

    ....and everything has been working fine until I tried to expand the
    functionality to allow the script to remove files on the central server
    when they no longer exist on the remote servers. I have tried the
    following:

    rsync -ruvvv - delete test_rsync_client::upload /wss/datafiles/
    rsync -ruvvv -del test_rsync_client::upload /wss/datafiles/
    rsync -ruvvv -delete ./ test_rsync_client::upload /wss/datafiles/
    rsync -ruvvv -delete * test_rsync_client::upload /wss/datafiles/

    ....and several others but I always get the following error:

    rsync: -delete: unknown option
    rsync error: syntax or usage error (code 1) at main.c(1084)
    _exit_cleanup(code=1, file=main.c, line=1084): about to call exit(1)

    ....we are using rsync 2.6.3 on the central server and 2.0.4 on the
    remote offices with the cygwin DLL. I should mention that we place
    everything in a site-to-site VPN so we re using the sockets method of
    using rsync, we are not using some other shell (i.e. SSH) to move the
    data.


  2. Re: Rsync syntax issues

    I think I figured it out after all, I need to have the "--delete"
    option with two "-".


+ Reply to Thread