Hi.

On Thu, 23 Feb 2017 11:07:16 -0500 Kevin Korb wrote:

> I hate to say it because it goes against my normal advice but this is
> one instance where using a * in the source parameter would help...

I totally agree.

I thing that using a protect filter achieves this goal (without using
a * thus).

Example:

    mkdir SOURCE/{a,b,c}
    mkdir TARGET/d

    ## FAIL: delete d
    rsync --dry-run -ai --delete SOURCE/ TARGET/ 
    *deleting   d/
    .d..t...... ./
    cd+++++++++ a/
    cd+++++++++ b/
    cd+++++++++ c/

    ## OK: for this trivial test
    rsync --dry-run -ai --delete --filter 'protect /*' SOURCE/ TARGET/
    .d..t...... ./
    cd+++++++++ a/
    cd+++++++++ b/
    cd+++++++++ c/

You may need to read carefully the FILTER RULES section of the rsync
manual. I didn't count the number of time I read it :-)

---
Francis

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to