Re: [Hampshire] Rsync question

Top Page

Reply to this message
Author: Vic
Date:  
To: hampshire
Subject: Re: [Hampshire] Rsync question
> I tried to use the exclude option in my command
>
> rsync -av --exclude=/mnt/sdb1/zunk /mnt/sdb1/ /mnt/sdc1/backups/
>
> but it did not work it still copied files over from zunk (the rest of the
> command worked as I intended)


rsync is a little peculiar in how it does its exclude patterns; they need
to be the pattern rsync sees, not the absolute pathname. So you woud want
something along the lines of "--exclude=/zunk". Use the -v option to show
you the patterns you've got...

> While not as important at the moment, I want to delete files from the
> destination location that are no longer in the senders location, I was
> thinking of using the
>
> --delete-after


--delete is the option you want; I don't know if --delete-after implies it...

Vic.