Originally posted by gnomek
View Post
Originally posted by gnomek
View Post
I know of NO reason to run chroot on the <ROOT_FS>, and certainly not to change the UUID. The UUID is generated automatically and the chances of two HD's having the same UUID are essentially zero. Besides, you have to do much more than just use chroot alone. You have to create a pseudo filesystem by using the bind command on subdirectories in /proc, /sys and /dev first. It is a lot easier to use firejail, or jailer, etc..., on an app (but not a drive!). They are in the repository. They are not meant to, and SHOULD NOT be used to, jail a BTRFS subvolume or <ROOT_FS>.
Chroot is NOT necessary for backing up snapshots to an external drive. In my posts on BTRFS you never saw me using chroot, or even firejail.
Assume you have a second drive in your machine and you used Partition Manager to format it as a BTRFS file system (sdb1, no mount point, it is just a pool). You use blkid to see its UUID and then use that to mount that drive to a mount point under /, which you created as root using: mkdir /backup, for example. Mount the second drive:
mount /dev/disk/by-uuid/whateveruuidis /backup
Done. Now you can use btrfs send & receive, as described in the tutorial and elsewhere, to send copies of snapshots to /backup. When you are done you sync a couple times and then unmount it: umount /backup
If you want to look into /mnt just cd to mount (cd /mnt) and then browse around inside @ or @home like you would browse around in / or /home, for they are one and the same. If you cd /mnt/snapshots you can browse those as well. They contain what your system looked like when the snapshot was made.
Leave a comment: