I always use an exclude file. And I sync different exclude files between
various servers.

I would put my excludes in a file.

My commandline:
rsync -aHz --delete --delete-excluded --force
--password-file=/etc/pootypoo.pwd --exclude-from=/etc/rsync.exclude rsync://
blarg.yashakarant.com/hootyhoo /archivea/blarg_backup

My /etc/rsyncd.conf (on the pushing/pulled server being backed up):
------------------------------------------
# /etc/rsyncd.conf
#
# motd file = /etc/rsyncd.motd
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid

read only = true
uid = root
gid = root
auth users = root
secrets file = /etc/rsyncd.pwd

# Allow root access from primary backup servers,
# secondary backup servers, local nets.
[hootyhoo]
        path = /
        hosts allow = 192.168.122
------------------------------------------------------------
My /etc/rsyncd.pwd (on the pushing/pulled server being backed up):
$cat /etc/rsyncd.pwd
------------------------------------------------------------
root:@#$%sadf15H^
------------------------------------------------------------

My /etc/rsync.exclude from the client pulling the rsync:
$cat /etc/rsync.exclude
------------------------------------------------------------
/mnt/*
/archive*/*_backup/
/tmp/*
/dev/*
/proc/*
/home/CDs/Linux/Wine/wine-1.7.37/*
------------------------------------------------------------

Dig?  You should use SSH as your shell for rsync so that your connections
are encrypted. This is only for a local, trusted network, as all transfers
will be in compressed cleartext. Right?


On Sat, Mar 7, 2015 at 7:28 PM, Chris Schanzle <[email protected]> wrote:

> On 03/07/2015 06:32 AM, David Sommerseth wrote:
>
>> From: "ToddAndMargo" <[email protected]>
>>> To: "SCIENTIFIC-LINUX-USERS" <[email protected]>
>>> Sent: 7. March 2015 05:40:43
>>> Subject: Re: need rsync exclude help
>>>
>>>       --exclude='{wine-*,wine-1.7.24}' /home/CDs/Linux /mnt/MyCDs/.
>>>>
>>>>  I am not real certain that the {} thingy works correctly.
>>> Anyway, I only needed 'wine-*'
>>>
>> That seems redundant in this case.  You can always test such expansions
>> using 'echo'
>>
>>    $ echo {wine-*,wine-1.7.24}
>>    wine-* wine-1.7.24
>>    $ echo wine-{1.7.24,package-1.2.3}
>>    wine-1.7.24 wine-package-1.2.3
>>
>>
> But note no expansion occurs by the shell when surrounded by single quotes:
>
> $ echo -exclude='{wine-*,wine-1.7.24}'
> -exclude={wine-*,wine-1.7.24}
>
> Rsync may do something with the braces, but not the shell, in this case.
>

Reply via email to