BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] Rsync "one file system"
- Subject: [Discuss] Rsync "one file system"
- From: dsr at randomstring.org (Dan Ritter)
- Date: Sat, 24 Oct 2020 16:19:55 -0400
- In-reply-to: <ed408ffa-13b8-ab77-4583-ec677968a61b@kjkelra.com>
- References: <ab779ead-e039-933e-989b-a1cffad193f7@kjkelra.com> <20201024165141.GO26101@randomstring.org> <ed408ffa-13b8-ab77-4583-ec677968a61b@kjkelra.com>
jbk wrote: > On 10/24/20 12:51 PM, Dan Ritter wrote: > > jbk wrote: > > > I was cloning a fedora31 system to another partition using rsync using the > > > -x option to restrict decent to one file system, at least that was what I > > > thought, but the contents below the mount point were copied anyway. > > > > > > rsync -ax bin boot data (<- mounted to separate partition) ... <destination> > > > > > > So what am I not understanding? > > Did it look like this? > > /dev/sdd1 on / type blah blah > > /dev/sdd2 on /data type blah blah > > > > or like this? > > > > /dev/sdd1 on / type blah blah > > /dev/sdd3 on /data/thingy type blah blah > > > > rsync -x includes anything you explicitly mention (so, all > > subdirectories of the top situation) and excludes filesystems > > mounted underneath what you mention (so, not /data/thingy in the > > bottom situation). > > > > -dsr- > > So data is a mount point in character with the first example, it is not a > bind mount. I understand that by using the "-a" option that recursion is > implied but if I added "-x" that it would skip recursion into normal mount > points. It skips recursion into mount points that are different from something that you told it about. If you say rsync -a -x / /home /var it will get everything that is directly on your root, everything in /home, even if /home is a mount point, and everything in /var, even if /var is a mount point, but it will skip: /tmp -- a mount point under / /var/tmp -- a mount point under /var Does that help? > > /rsync -x includes anything you explicitly mention (so, all > > subdirectories of the top situation) and excludes filesystems mounted > > underneath what you mention (so, not /data/thingy in the bottom > > situation)./ > So if I'm understanding this, if there were a mount point /backups below > /data such as /data/backups then /backups would not be recursed because it > was not part of the top level listing in the command. Correct. -dsr-
- References:
- [Discuss] Rsync "one file system"
- From: jbk at kjkelra.com (jbk)
- [Discuss] Rsync "one file system"
- From: dsr at randomstring.org (Dan Ritter)
- [Discuss] Rsync "one file system"
- From: jbk at kjkelra.com (jbk)
- [Discuss] Rsync "one file system"
- Prev by Date: [Discuss] Rsync "one file system"
- Next by Date: [Discuss] Rsync "one file system"
- Previous by thread: [Discuss] Rsync "one file system"
- Next by thread: [Discuss] Rsync "one file system"
- Index(es):