Re: [Hampshire] Rsync question

Top Page

Reply to this message
Author: Jon Wilks
Date:  
To: lug, Hampshire LUG Discussion List
CC: 
Subject: Re: [Hampshire] Rsync question
And take my advice. Use the -n switch with the --delete switch to
begin with. This will list out all files that will get deleted
without actually doing it. I personally have made some spectacular
cockups with --delete.

Jon.

2008/6/22 Vic <lug@???>:
>> 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.
>
> --
> Please post to: Hampshire@???
> Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
> LUG URL: http://www.hantslug.org.uk
> --------------------------------------------------------------
>