On May 21, 2025, Jonathan Dowland wrote:
On Tue May 20, 2025 at 3:50 PM BST, Dan Purgert wrote:
I used /mnt/backup because I only wanted the partition mounted while the backup was running (it was one of several on that physical drive). The backup script did the mount/rsync/unmount as part of the execution.
Really, the only point of this was a "well, I can't accidentally delete
it if it's not mounted" train of thought.
I can sympathize with that. I use a similar approach, except using systemd features. My backup jobs are systemd services, which depend upon
Hah, that old script was from way back in 2004(? '05?); so systemd
definitely wasn't an option at the time. :)
[...]
I'd actually like to do this differently: I'd like /backup permanently mounted, but in a separate mount namespace from the main system. And I'd
like backup jobs to enter that namespace. I haven't managed to get
something like this working with systemd features.
As far as I know namespaces (read: poorly), the backup script would need
to execute setns(2) in order to join the previously created namespace
for your "/backup" target. But, I've only used them with networking
devices, so there may be other caveats here.
--
Please do not CC me for listmail.
👱🏻 Jonathan Dowland
✎ [email protected]
🔗 https://jmtd.net
--
|_|O|_|
|_|_|O| Github:
https://github.com/dpurgert
|O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEE3asj+xn6fYUcweBnbWVw5UznKGAFAmgtmDcACgkQbWVw5Uzn KGCBUhAAh1MLna3Td3b/nlV+m6DpDu1AT7LUeRHkNpecRsStqBRzR16CNcVMYh+3 ThVMwOLjyZiamM8zvO4ZPjtSDlWjpW96f7bhBU6Lx6X4vxXE4pGOnnx9PYPNmmRG aylThDirBAd8NOUazVenHL6EucRt13oTfvJ3C492HDBCmwwYhUIJBzhzOX2iEb+w 87c/nppVs+aIiChNVuhHL7SN7TfyIErQH/JtOwxsrv9IPZHfwRlLizUp+T7VNq4N IclUvLkSpRMbAHB0ERczHPeiEkbI1FEDCYnQd4SLoDxO3atLh6qJK8f0dExLDLrp XAvwQMnDTUv4WIYW/O4CoVs4itP76dUUP0Seh4VdHp0nN4vl/1gsPdS+lN803BFz p4xyNilETbZdzuIHYUNrswPgtCK/ER+tBeAqcFnV21BF+QEh7xMx4UAtnk187YWT iSr/cNxvONUWMKO+7LW8J5q8zO9MlWyzDAXn1O+Xvd4B9oLTBsuOKizROMrfUgtR eSW3+fC7aWxh10Ha9sZQ1jCmTGB1wV6m24RYVdD0kWZijQ1oyXeKuGiNyUsqdhrR l9hI1XuT2KDRiGH57G9OjzwkNIC+VPcLiMQRrMFFrqcPvMQLwyRNIArD4D0aeoJq WPl0xUrfZ7gDgjefcqa5UK1nstvt4ps1h/Fl1BgQK8mUcD1d+oE=
=yQn6
-----END PGP SIGNATURE-----
--- SoupGate-Win32 v1.05
* Origin: fsxNet Us