On 12/02/11 11:48, john lewis wrote:
> On Fri, 11 Feb 2011 18:49:19 +0000
> James Courtier-Dutton<james.dutton@???> wrote:
>
> <snipped>
>> rsync is good so I think the problem is elsewhere.
>
> I think I am getting somewhere with the syntax of the rsync command
> line, I am trying the following
>
> -vv verbose
> -g preserve group
> -W send whole files
> --exclude-from=$EXCLUDES
>
> the last is one I'm not sure of, does the 'exludes' apply at both ends?
> I have created an 'excludes' file listing certain files in the local
> database which I don't want copied to the remote database, but I don't
> want to delete any files with same names in the remote database.
>
> or should I use?
> --n--delete
rsync is fairly foolproof -- it only deletes things if you ask it to.
i.e. it doesn't delete anything unless you use one of the --delete...
options. (I know the man page says that --delete-before is the default,
but it just means that 'before' is the default time to do deletes IF
you're deleting anything.)
Only files/and directories that are not excluded are copied. If you
switch on deletions, only directories that are not excluded are
candidates for any of their contents to be deleted.
For general use, all you need is
rsync -av src dest
If you're copying a directory with hard links, or a whole system that
includes obscure things like pipes and devices, then use
rsync -avHAX src dest
And if you want more information about which files are being copied and
which are already up to date on the destination, then -i
(--itemize-changes) is more helpful than -v.
cheers
Chris
--
Chris Dennis cgdennis@???
Fordingbridge, Hampshire, UK