Why not use --one‐file‐system of rsync option by default ?I understand /mnt is excluded in the backup which makes sense. That's why I asked whether a different mountpoint like /NAS/<external drive name> will be saved in the backup and restored.
If not excluded, '/NAS/<external drive name>' would be saved in the backup and restored, along with the contents of anything mounted there.
If '/NAS/<external drive name>' is also the destination for the backup image file, there will be nasty recursion problems.
It might be that some older Linux systems it is too difficult to determine the main root content filesystem, maybe because people use separate mount for /var or no initramfs is used and root is on /dev/root or overlay filesystem is used. I never really used that in Linux/Raspbian, I have always used initramfs and also use btrfs subvolumes.
-x or --one‐file‐system is roughly my default option always, I could exclude /.snapshots but then need to recreate it, so extra work and problems. --one‐file‐system works perfectly fine for that. I actually use subvolumes extensively to exclude various parts of the rootfs like a .cache homedir folder, it easily contains 1GB of 'rubbish' (e.g. from internet browsers) s don't need backup.
Statistics: Posted by redvli — Sat Sep 14, 2024 6:43 am