Using rsync for a backup program but having trouble getting --exclude-from to work properly

Robert Parker rlp1938 at gmail.com
Thu Apr 16 09:56:56 GMT 2009


On Thu, Apr 16, 2009 at 4:33 PM, Paul Slootman <paul+rsync at wurtel.net> wrote:
> On Thu 16 Apr 2009, Robert Parker wrote:
>
>> fromdir=/home/bob/
>> rsync --exclude-from="$excl" -a -b -vv --suffix="$suffix" $fromdir $todir
>
>> Here is the content of the exclude file
>>
>> /home/bob/.mozilla/firefox/
>
> If you're passing /home/bob/ as the source dir, then you have to remove
> /home/bob from the exclude patterns as those patterns are relative to
> the transfer source. I.e.
>
> /home/bob/.mozilla/firefox/
> etc.
>
> becomes
>
> /.mozilla/firefox/
> /Ebooks.desktop
> /Office.desktop
> /Pictures.desktop
> /Programs.desktop

Thank you for that. I reckon I can fix it now.

Bob


More information about the rsync mailing list