From: Ulli Horlacher <framstag@rus.uni-stuttgart.de>
To: linux-btrfs@vger.kernel.org
Subject: Re: rsync -ax and subvolumes
Date: Fri, 11 Oct 2019 08:15:44 +0200 [thread overview]
Message-ID: <20191011061544.GB3648@tik.uni-stuttgart.de> (raw)
In-Reply-To: <CAMthOuMV7MgB4b87RsijYr9e0UsjMUDNk+QRXeauFdb3cZcTjw@mail.gmail.com>
On Thu 2019-10-10 (20:47), Kai Krakow wrote:
> Actually, you could also just bind-mount into /mnt/btrfs, bind-mounts
> won't inherit other mounts but will still see pure subvolumes.
Next problem:
root@ptm1:~# sysinfo
System: Linux ptm1 4.4.180-94.100-default x86_64
Distribution: SUSE Linux Enterprise Server 12 SP3
root@ptm1:~# mount | grep sda
/dev/sda2 on / type btrfs (rw,relatime,space_cache,subvolid=453,subvol=/@/.snapshots/128/snapshot)
/dev/sda2 on /.snapshots type btrfs (rw,relatime,space_cache,subvolid=270,subvol=/@/.snapshots)
/dev/sda2 on /opt type btrfs (rw,relatime,space_cache,subvolid=259,subvol=/@/opt)
/dev/sda2 on /var/log type btrfs (rw,relatime,space_cache,subvolid=264,subvol=/@/var/log)
/dev/sda2 on /srv type btrfs (rw,relatime,space_cache,subvolid=260,subvol=/@/srv)
/dev/sda2 on /var/tmp type btrfs (rw,relatime,space_cache,subvolid=267,subvol=/@/var/tmp)
/dev/sda2 on /var/spool type btrfs (rw,relatime,space_cache,subvolid=266,subvol=/@/var/spool)
/dev/sda2 on /usr/local type btrfs (rw,relatime,space_cache,subvolid=262,subvol=/@/usr/local)
/dev/sda2 on /var/opt type btrfs (rw,relatime,space_cache,subvolid=265,subvol=/@/var/opt)
/dev/sda2 on /home type btrfs (rw,relatime,space_cache,subvolid=258,subvol=/@/home)
/dev/sda2 on /var/lib/machines type btrfs (rw,relatime,space_cache,subvolid=1235,subvol=/@/var/lib/machines)
/dev/sda2 on /tmp type btrfs (rw,relatime,space_cache,subvolid=261,subvol=/@/tmp)
/dev/sda2 on /var/crash type btrfs (rw,relatime,space_cache,subvolid=263,subvol=/@/var/crash)
root@ptm1:~# mount -o bind / /mnt/tmp
root@ptm1:~# find /opt | wc -l
564
root@ptm1:~# find /mnt/tmp/opt | wc -l
1
I want to copy everything from /dev/sda2 with rsync, but not from other devices.
rsynv -avH / /mnt/usb # copies also /proc /dev etc
rsynv -avHx / /mnt/usb # copies ONLY / but not /opt /var/log etc
And yes, it must be rsync, because I run this command often, for syncing.
--
Ullrich Horlacher Server und Virtualisierung
Rechenzentrum TIK
Universitaet Stuttgart E-Mail: horlacher@tik.uni-stuttgart.de
Allmandring 30a Tel: ++49-711-68565868
70569 Stuttgart (Germany) WWW: http://www.tik.uni-stuttgart.de/
REF:<CAMthOuMV7MgB4b87RsijYr9e0UsjMUDNk+QRXeauFdb3cZcTjw@mail.gmail.com>
next prev parent reply other threads:[~2019-10-11 6:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-10 17:20 rsync -ax and subvolumes Ulli Horlacher
2019-10-10 18:47 ` Kai Krakow
2019-10-10 21:21 ` Ulli Horlacher
2019-10-11 11:32 ` Austin S. Hemmelgarn
2019-10-11 6:15 ` Ulli Horlacher [this message]
2019-10-11 18:17 ` Andrei Borzenkov
2019-10-16 19:07 ` Kai Krakow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191011061544.GB3648@tik.uni-stuttgart.de \
--to=framstag@rus.uni-stuttgart.de \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).