New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/home not included in NETFS backup when it is a btrfs subvolume #2604
Comments
@jadupl2 Could you paste the |
Here there are .
Thank you in advance
```bash
$ cat /var/lib/rear/layout/disklayout.conf
# Disk layout dated 20210422000514 (YYYYmmddHHMMSS)
# NAME KNAME PKNAME TRAN TYPE FSTYPE SIZE MOUNTPOINT
# /dev/sda /dev/sda ata disk 111.8G
# |-/dev/sda1 /dev/sda1 /dev/sda part ext4 1G /boot
# `-/dev/sda2 /dev/sda2 /dev/sda part btrfs 110.8G /home
# /dev/sr0 /dev/sr0 ata rom 1024M
# /dev/zram0 /dev/zram0 disk 1.9G [SWAP]
# Disk /dev/sda
# Format: disk <devname> <size(bytes)> <partition label type>
disk /dev/sda 120034123776 msdos
# Partitions on /dev/sda
# Format: part <device> <partition size(bytes)> <partition start(bytes)>
<partition type|name> <flags> /dev/<partition>
part /dev/sda 1073741824 1048576 primary boot /dev/sda1
part /dev/sda 118958850048 1074790400 primary none /dev/sda2
# Filesystems (only ext2,ext3,ext4,vfat,xfs,reiserfs,btrfs are supported).
# Format: fs <device> <mountpoint> <fstype> [uuid=<uuid>] [label=<label>]
[<attributes>]
fs /dev/sda1 /boot ext4 uuid=9cbff2d8-d27e-4c02-997a-c91f948bb124
label=/boot blocksize=4096 reserved_blocks=4% max_mounts=-1
check_interval=0d bytes_per_inode=16384
default_mount_options=user_xattr,acl options=rw,relatime,seclabel
fs /dev/sda2 / btrfs uuid=f35c28b2-8afc-4ff2-9adc-f37fe0d0f6a8
label='fedora_localhost-live'
options=rw,relatime,ssd,space_cache,subvolid=257,subvol=/root
# Btrfs default subvolume for /dev/sda2 at /
# Format: btrfsdefaultsubvol <device> <mountpoint> <btrfs_subvolume_ID>
<btrfs_subvolume_path>
btrfsdefaultsubvol /dev/sda2 / 5 /
# Btrfs normal subvolumes for /dev/sda2 at /
# Format: btrfsnormalsubvol <device> <mountpoint> <btrfs_subvolume_ID>
<btrfs_subvolume_path>
btrfsnormalsubvol /dev/sda2 / 256 home
btrfsnormalsubvol /dev/sda2 / 257 root
btrfsnormalsubvol /dev/sda2 / 258 root/var/lib/machines
# All mounted btrfs subvolumes (including mounted btrfs default subvolumes
and mounted btrfs snapshot subvolumes).
# Determined by the findmnt command that shows the mounted
btrfs_subvolume_path.
# Format: btrfsmountedsubvol <device> <subvolume_mountpoint>
<mount_options> <btrfs_subvolume_path>
btrfsmountedsubvol /dev/sda2 /
rw,relatime,seclabel,ssd,space_cache,subvolid=257,subvol=/root root
btrfsmountedsubvol /dev/sda2 /home
rw,relatime,seclabel,ssd,space_cache,subvolid=256,subvol=/home home
# Mounted btrfs subvolumes that have the 'no copy on write' attribute set.
# Format: btrfsnocopyonwrite <btrfs_subvolume_path>
# Swap partitions or swap files
# Format: swap <filename> uuid=<uuid> label=<label>
swap /dev/zram0 uuid=e7d3bc7c-9a31-4a4f-b69d-fa0f752140e2 label=
$ mount -v
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs
(rw,nosuid,noexec,seclabel,size=1985616k,nr_inodes=496404,mode=755,inode64)
securityfs on /sys/kernel/security type securityfs
(rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel,inode64)
devpts on /dev/pts type devpts
(rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs
(rw,nosuid,nodev,seclabel,size=801956k,nr_inodes=819200,mode=755,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2
(rw,nosuid,nodev,noexec,relatime,seclabel,nsdelegate)
pstore on /sys/fs/pstore type pstore
(rw,nosuid,nodev,noexec,relatime,seclabel)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
none on /sys/kernel/tracing type tracefs (rw,relatime,seclabel)
/dev/sda2 on / type btrfs
(rw,relatime,seclabel,ssd,space_cache,subvolid=257,subvol=/root)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,nosuid,noexec,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs
(rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=17017)
hugetlbfs on /dev/hugepages type hugetlbfs
(rw,relatime,seclabel,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime,seclabel)
debugfs on /sys/kernel/debug type debugfs
(rw,nosuid,nodev,noexec,relatime,seclabel)
fusectl on /sys/fs/fuse/connections type fusectl
(rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs
(rw,nosuid,nodev,noexec,relatime)
/dev/sda2 on /home type btrfs
(rw,relatime,seclabel,ssd,space_cache,subvolid=256,subvol=/home)
/dev/sda1 on /boot type ext4 (rw,relatime,seclabel)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
tmpfs on /run/user/42 type tmpfs
(rw,nosuid,nodev,relatime,seclabel,size=400976k,nr_inodes=100244,mode=700,uid=42,gid=42,inode64)
tmpfs on /run/user/1001 type tmpfs
(rw,nosuid,nodev,relatime,seclabel,size=400976k,nr_inodes=100244,mode=700,uid=1001,gid=1001,inode64)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc
(rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/user/1000 type tmpfs
(rw,nosuid,nodev,relatime,seclabel,size=400976k,nr_inodes=100244,mode=700,uid=1000,gid=1000,inode64)
$ df
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 1985616 0 1985616 0% /dev
tmpfs 2004884 0 2004884 0% /dev/shm
tmpfs 801956 1696 800260 1% /run
/dev/sda2 116170752 22706588 92788980 20% /
/dev/sda2 116170752 22706588 92788980 20% /home
/dev/sda1 999320 310504 620004 34% /boot
tmpfs 400976 80 400896 1% /run/user/42
tmpfs 400976 56 400920 1% /run/user/1001
tmpfs 400976 56 400920 1% /run/user/1000
```
|
In general btrfs subvolumes behave like separated filesystems. With BACKUP=NETFS ReaR calls So what behaves like separated filesystems must be explicitly |
@jsmeix Thanks Johannes as I was up to write the same thing to have a look at the example conf file of SLE12-SP2-btrfs to get some inspiration. Can this be automated somehow?? |
Thank You very much
I will include /home in the BACKUP_PROG_INCLUDE array
A+
…On Thu, Apr 22, 2021 at 9:37 AM Johannes Meixner ***@***.***> wrote:
In general btrfs subvolumes behave like separated filesystems.
With BACKUP=NETFS ReaR calls tar with --one-file-system
cf. usr/share/rear/backup/NETFS/default/500_make_backup.sh
https://github.com/rear/rear/blob/master/usr/share/rear/backup/NETFS/default/500_make_backup.sh
So what behaves like separated filesystems must be explicitly
specified in the BACKUP_PROG_INCLUDE array.
For an example see
usr/share/rear/conf/examples/SLE12-SP2-btrfs-example.conf
in particular see the comments therein
https://github.com/rear/rear/blob/master/usr/share/rear/conf/examples/SLE12-SP2-btrfs-example.conf
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2604 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQUGCPXSALSMCQUI53IM7DTKARCRANCNFSM43KSL63A>
.
|
I think it cannot be automated with reasonable effort to work reasonably well I have no good idea how to find out in a reasonable automated way At least one main problem are btrfs snapshot subvolumes, see In general I won't implement automatisms for btrfs on my own But often I am just confused when I try to think about btrfs things |
For normal cases (i.e. when no btrfs subvolumes are used) we have in
and according to the
/home is mounted but the above code does somehow |
The mountpoint_device file is populated via
so it only considers the Perhaps also considering the |
Here for better readability the disklayout.conf of @jadupl2
|
ReaR version ("/usr/sbin/rear -V"):
jacques@yoda:~ $ rear -V
Relax-and-Recover 2.6 / 2020-06-17
OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"):
Hardware (PC or PowerNV BareMetal or ARM) or virtual machine (KVM guest or PoverVM LPAR):
Dell Laptop D630
System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):
BIOS
SSD
Description of the issue (ideally so that others can reproduce it):
Just do a rear backup , and check backup content /home not included
Workaround, if any:
Did not find one
rear_yoda.log.zip
rear-yoda.log.zip
The text was updated successfully, but these errors were encountered: