Skip to content
  • Nikos Skalkotos's avatar
    Completely exclude mpoints when running rsync · 252b2b5d
    Nikos Skalkotos authored
    We used to exclude mount point from rsync with options like this:
    
     --exclude mount/point/*
    
    This will copy the directory and leave out all files under it. In
    some cases, this causes problems because rsync will fail if it
    cannot stat the directory and some mount point will only return
    stat info to their owner and not root. Even if this wasn't the
    case, we cannot determine the real directory attributes. The stat
    syscall will return the attributes associated with the mount
    options. It's better to completely exclude those mpoints in rsync
    and create them explicitly after the command runs. We make them
    inherit the mode and the ownership of their parent directory.
    252b2b5d