Rsync bug with -x/--one-file-system and /
Chris Lewis
clewis at nortel.com
Fri Apr 20 04:25:55 GMT 2007
I checked the archives and bug lists, and didn't see this. Or rather, I
saw someone report it, but it was backrev and a "non-standard" release,
so that was considered out of bounds.
I'm running on Ubuntu Dapper Drake, and first experienced this problem
trying to do rsync backups via backuppc. I wanted to do a "don't cross
filesystem boundary" backup from / so I didn't have to explicitly
exclude mount points (eg: NFS mounts, backup partition, USB drives,
cdroms, /proc etc).
Dapper's rsync is 2.6.6, so I upgraded to 2.6.9 just in case, and still
see it.
This is the problem reduced to the simplest form:
sh-3.1# ./rsync --version
rsync version 2.6.9 protocol version 29
sh-3.1# ./rsync -x / /zorilla/foo
skipping directory /.
Nothing is copied.
rsync's device crossing detector seems to get confused about /, and
refuses to traverse it if -x or --one-file-system is on.
My workaround is to enumerate and exclude all mount points, but one day
someone is going to mount something somewhere unusual, and even maybe
end up with an infinitely recursive backup.
More information about the rsync
mailing list