rsync has big problem with leaving lots of empty dirs around...

Linda Walsh rsync at tlinx.org
Fri Oct 19 14:39:18 MDT 2012


Karl O. Pinc wrote:
> If you want help with your problem you're going to have
> to describe exactly what you're doing; what command
> you're running, what version of rsync, and so forth.
---

Thanks...was going to file a bug report on it when I got
time... just haven't gotten to it.

Already worked around the problem 'find <targetdir> -type d -empty -delete'

The "severity of impact" is that it creates alot of empty dirs...
i.e. not horribly severe, but a bit excessive.

  mentioned it on list to see if anyone wanted more information or cared or
had also run into it, or if it was a known problem -- or possibly even
viewed as a 'feature' (!?)...heck if I know.
(might be required by POSIX for all I know! (I know, unlikely)  ;-) )...
I usually try to mention probs on a list before filing a bug report, as
I'd prefer to find out I'm screwing up and forgot to "plug it in", rather
than filing a bug report that would be a waste...


Command is run from perl:

[$Rsync];
#parameters:
push( @$rcmd, qw(--archive --human-readable --acls --xattrs --hard-links
      --no-inc-recursive --prune-empty-dirs --whole-file --one-file-system),
     '--compare-dest=' . $base_lvh->fs_mp . "/.");   # (i.e. "/home/.")
push @$rcmd, $OAsnap_lvh->fs_mp . "/.", $bdiff_lvh->fs_mp . "/";
          # "/home/.snapshot/date/."   "/home.diff/"


So compare "yesturday's snapshot" (or day before)... with an empty dir (diff dir
starts empty), but don't put in anything that is still the same on today's current
and active image.   So "anything that was different yesturday", is put on the 
diff dir.

I had thought (perhaps incorrectly), that "--prune-empty-dirs" wouldn't bother
to create an extra 250,000 empty directories...


Both file systems are 'xfs' running under linux 3.x (currently 3.6.2) under
an openSuSE 12.1 release.
rsync --version:
rsync  version 3.0.9  protocol version 30
Capabilities:
     64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
     socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
     append, ACLs, xattrs, iconv, symtimes, SLP

...??what's SLP?....

good prep for filing the bug report at some point...;-)

Thanks for a prompt -- didn't know what anyone would want (if anything).

-Linda


More information about the rsync mailing list