Rsync deletes too much?

Marco Nicosia marco at
Mon Oct 13 11:07:31 EST 2003

Hello. I'm having a problem using rsync to copy my root partition to a
new disk. This disk has a previous copy on it, and rsync seems determined
to (unnecessarily) delete files from it. Worse, despite the fact that the
files DO exist on the source, it does not update the destination, leaving
me with less than I had before?!

Here's my usage:

] server# /usr/local/bin/rsync -naxv --delete --progress --stats --exclude '/dev/' --exclude '/tmp/' --exclude '/usr/var/tmp/' --exclude '/usr/var/run/' / /tmp/bkup/ | grep -c deleting
] 105668

And here's a specific example:

]  server# /usr/local/bin/rsync -naxvv --delete --progress --stats --exclude '/dev/' --exclude '/tmp/' --exclude '/usr/var/tmp/' --exclude '/usr/var/run/' / /tmp/bkup/ | grep 'x11amp/files/main.xpm'
]  deleting usr/ports/audio/x11amp/files/main.xpm

I'm confounded why it would do this:

]  server# ls -l /usr/ports/audio/x11amp/files/main.xpm /tmp/bkup/usr/ports/audio/x11amp/files/main.xpm
]  -rw-r--r--  1 root  wheel  68484 Dec 11  2001 /tmp/bkup/usr/ports/audio/x11amp/files/main.xpm
]  -rw-r--r--  1 root  wheel  68484 Dec 11  2001 /usr/ports/audio/x11amp/files/main.xpm

I'm running, on FreeBSD 5.1 CURRENT:
] server# rsync --version
] rsync  version 2.5.6  protocol version 26
] Copyright (C) 1996-2002 by Andrew Tridgell and others
] <>
] Capabilities: 64-bit files, socketpairs, hard links, symlinks, batchfiles, 
]               IPv6, 32-bit system inums, 64-bit internal inums
] rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
] are welcome to redistribute it under certain conditions.  See the GNU
] General Public Licence for details.

Marco E. Nicosia  |  |  marco at

More information about the rsync mailing list