john@gngsta.com
2003-Aug-20 22:03 UTC
--delete not working when files are pushed to rsync daemon
Hi. I've been having a frustrating problem with rsync that I'm looking for advice on. My goal is to syncronize a set of servers with the same libraries, binaries, and main configuration files without touching the unique data that exists on the indivudual servers. My --exclude-from file is rather extensive but it works great when pulling from a daemon. I'm able to start an rsync daemon on any of the indivudual servers and pull the system libraries and binaries to a test box without pulling the unique data on the server. As I'm trying to move this into production, I've started rsync daemons on the individual servers, and then on my build server, I run an rsync in dry-run mode to push /platform out to one of the servers. Any new or modified files are noticed by the rsync daemon and would be pushed out, but even though I'm using --delete, files "that don't exist on the sending side" are not deleted. My rsyncd.conf on the individual servers is simple: [platform] path = / use chroot = no read only = no uid = root gid = root hosts allow = n.n.n.n/m The command line I use when pushing is slightly longer: build# rsync -a -vvv -n --delete --exclude-from rsync.excludes /platform/ individual.server::platform As I mentioned, this works great for new files and modified files. If /platform/etc/dir and /platform/etc/dir/file are created on the build server, /etc/dir and /etc/dir/file will be created on the individual server. However, if /etc/dir/tmp is created on an invididual server, the next rsync push from the build server will NOT list it as marked for deletion, even when using --delete. Does --delete only work when *pulling* from a server? If so, do I have any options for doing what I'm trying to do without running a daemon on the build server and pulling from the individual servers? If any of this is unclear, please let me know and I'll be more than happy to clarify. Thanks very much for any assistance. -- john
Wayne Davison
2003-Aug-21 04:17 UTC
--delete not working when files are pushed to rsync daemon
On Wed, Aug 20, 2003 at 07:03:34AM -0500, john@gngsta.com wrote:> build# rsync -a -vvv -n --delete --exclude-from rsync.excludes /platform/ individual.server::platformI assume that the files that are not being deleted are excluded by the --exclude-from rules -- all files (on both sides) that match these patterns are excluded both from transfer and from deletion. You may wish to try --delete-excluded, but that might delete too much. If the vanished file is not excluded, you'll need to be more explicit in exactly what deletion is not happening. Keep in mind that in the case of the command above, the deletions that should be happening are in the individual.server::platform module based on vanished files/directories on the system that is running the rsync command. Also, you don't mention what version of rsync you're using. If it's older than 2.5.6, please upgrade. ..wayne..
Maybe Matching Threads
- Compile Errors with e2fsprogs-1.24a
- failed to build llvm since 25de7691a0e27c29c8d783a22373cc265571f5e9 on AMD platform
- failed to build llvm since 25de7691a0e27c29c8d783a22373cc265571f5e9 on AMD platform
- mariadb: How to delete foreign key constraint from non-existing table?
- Dovecot IMAP/POP3 Proxy with LDAP