[Sussex] Rsync and excluded files

Bob Williams (SLUG) linux at barrowhillfarm.org.uk
Sun Sep 24 17:52:35 UTC 2006


Andy Smith wrote:
> On Sun, Sep 24, 2006 at 12:42:13PM +0100, Bob Williams (SLUG) wrote:
>> I'm having trouble getting rsync to read/act on my excluded files. The
>> significant line in my script is
>>
>> /usr/bin/rsync -av --delete
>> --exclude-from=/home/bob/Documents/scripts/backup/excludedfiles
>> /home/bob /home/pub/My_Pictures /home/pub/Shared_Documents
>> /home/pub/HilsComputer /media/toshiba/backup.0
>>
>> and the contents of '../excludedfiles' is
>>
>> /home/bob/bacula
>> /home/bob/.opera/cache4
>> /home/bob/Utilities
>> /home/pub/downloads
>> /home/pub/vmware
> 
> The paths in the exclude file should be relative to what you're
> syncing, i.e. if you're rsyncing /home/bob/ and want to exclude
> /home/bob/bacula then the entry would be "bacula".
> 
Thanks Andy. Now I need some help with trailing slashes. I'm actually
rsyncing /home/bob (no trailing /) so that the backup creates a
directory bob on the destination disk (an external USB drive), and
recurses into all the directories below that. The same applies to the
other sources. So, in my excludedfiles file, should I put

bacula

or

/bacula

or

../bacula?

> Incidentally, have a look at rsnapshot.  It's really nice for staged
> snapshots using rsync.
>
Looks neat, and is in fact based on the same system I'm using here -
Mike's handy automated backup routine.

Bob
-- 
Bob

SuSE Linux 10.1, KDE 3.5.1




More information about the Sussex mailing list