I'd like to rsync (backup) a chroot environment from outside the chroot. For that I first make a lvm snapshot of the chroot volume and then run rsync on that.
The only problem with this approach: Symlinks that inside the chroot are absolute are now pointing to the outer-chroot-system and are of course not matching. Since I would like to use copy-unsafe-links, this leads to a false link resolution. Is there a way to make rsync resolve symlinks from another directory than the main root or is there another way to solve this?
-L
)? or copy the symlink itself (-l
)?rsync
-means. I just played with-R
,-l
,-k
- this does not do what you want. There has to be a chroot-mode for rsync to accomplish what you want. Make a feature-request to the rsync-developers...