our daily backup is done using the rdiff-backup tool, which in turn utilizes rsync/librsync to do the actual mirroring work. a few days ago we did a refactoring and renamed a bunch of directories. for backward compatibility we maintain the old names by symlinking it to the new names. so, for example, oldname1/ now becomes newname1/, and oldname1 is now a symlink to newname1/. we found that now the mirroring cannot complete. rsync doesn't seem to be able to handle this. it tries to do an rmdir(oldname1) followed by symlink(newname1,oldname1). however, since the directory oldname1/ in the old mirror is not empty, rmdir fails with "Directory not empty" and thus symlink fails too with "File exists" (since oldname1 has not been deleted yet). any pointers? we looked at the available rsync options but have found no clue yet. -- dave
I have observed this same problem. Are you running --delete-after? I assumed it might be related to that option. eric David Garamond wrote:> > our daily backup is done using the rdiff-backup tool, which in turn > utilizes rsync/librsync to do the actual mirroring work. > > a few days ago we did a refactoring and renamed a bunch of directories. > for backward compatibility we maintain the old names by symlinking it to > the new names. so, for example, oldname1/ now becomes newname1/, and > oldname1 is now a symlink to newname1/. > > we found that now the mirroring cannot complete. rsync doesn't seem to > be able to handle this. it tries to do an rmdir(oldname1) followed by > symlink(newname1,oldname1). however, since the directory oldname1/ in > the old mirror is not empty, rmdir fails with "Directory not empty" and > thus symlink fails too with "File exists" (since oldname1 has not been > deleted yet). > > any pointers? we looked at the available rsync options but have found no > clue yet. > > -- > dave > > -- > To unsubscribe or change options: lists.samba.org/mailman/listinfo/rsync > Before posting, read: tuxedo.org/~esr/faqs/smart-questions.html
just to correct myself: this has nothing to do with rdiff-backup (which uses *rdiff*, not rsync). local backups with the rdiff-backup tool are fine. the problem is with rsync, when we are trying to mirror the local backups to another machine using rsync. David Garamond wrote:> our daily backup is done using the rdiff-backup tool, which in turn > utilizes rsync/librsync to do the actual mirroring work. > > a few days ago we did a refactoring and renamed a bunch of directories. > for backward compatibility we maintain the old names by symlinking it to > the new names. so, for example, oldname1/ now becomes newname1/, and > oldname1 is now a symlink to newname1/. > > we found that now the mirroring cannot complete. rsync doesn't seem to > be able to handle this. it tries to do an rmdir(oldname1) followed by > symlink(newname1,oldname1). however, since the directory oldname1/ in > the old mirror is not empty, rmdir fails with "Directory not empty" and > thus symlink fails too with "File exists" (since oldname1 has not been > deleted yet). > > any pointers? we looked at the available rsync options but have found no > clue yet.-- dave
Dave, What you need is the --force option. It's not obvious from the all-too-generic name, but that will do the trick. To the rsync maintainers - this is somewhat of an FAQ. Perhaps the error message could also say '(see the --force option)' to help users discover the solution more easily. -- John Van Essen Univ of MN Alumnus <vanes002@umn.edu> 3DGamers Systems Software Support <jve@3dgamers.com> On Sun, 05 Jan 2003, David Garamond <davegaramond@icqmail.com> wrote:>just to correct myself: this has nothing to do with rdiff-backup (which >uses *rdiff*, not rsync). local backups with the rdiff-backup tool are >fine. the problem is with rsync, when we are trying to mirror the local >backups to another machine using rsync. > >David Garamond wrote: >> our daily backup is done using the rdiff-backup tool, which in turn >> utilizes rsync/librsync to do the actual mirroring work. >> >> a few days ago we did a refactoring and renamed a bunch of directories. >> for backward compatibility we maintain the old names by symlinking it to >> the new names. so, for example, oldname1/ now becomes newname1/, and >> oldname1 is now a symlink to newname1/. >> >> we found that now the mirroring cannot complete. rsync doesn't seem to >> be able to handle this. it tries to do an rmdir(oldname1) followed by >> symlink(newname1,oldname1). however, since the directory oldname1/ in >> the old mirror is not empty, rmdir fails with "Directory not empty" and >> thus symlink fails too with "File exists" (since oldname1 has not been >> deleted yet). >> >> any pointers? we looked at the available rsync options but have found no >> clue yet. > >-- >dave
Possibly Parallel Threads
- reconnect ssh connection?
- [librsync-devel] librsync and rsync vulnerability to maliciously crafted data. was Re: MD4 checksum_seed
- state of the rsync nation? (revisited 6/2003 from 11/2000)
- Incremental backups and batch mode.
- Java implementation - about weak checksum difference