• Re: mounting backup filesystem on-demand (was Re: Checking for a mount

    From Nicolas George@21:1/5 to All on Wed May 21 11:10:01 2025
    Jonathan Dowland (HE12025-05-21):
    I'd like /backup permanently
    mounted

    Does it mean you like your backup drive to be permanently plugged to the computer? That protects you from hardware failures and human mistakes,
    but not from large physical damage or theft.

    Regards,

    --
    Nicolas George

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to Nicolas George on Wed May 21 11:30:01 2025
    On Wed, May 21, 2025 at 11:05:37AM +0200, Nicolas George wrote:
    Jonathan Dowland (HE12025-05-21):
    I'd like /backup permanently
    mounted

    Does it mean you like your backup drive to be permanently plugged to the computer? That protects you from hardware failures and human mistakes,
    but not from large physical damage or theft.

    Actually, this makes a lot of sense (well, nearly): keep backup constantly synced, unmount/mount only on media rotation, carry freshly unmounted
    medium to safe place.

    Cheers
    --
    t

    -----BEGIN PGP SIGNATURE-----

    iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCaC2bTwAKCRAFyCz1etHa RpBmAJ9JyIxxqPMH6jZ0meYTyEKJmHWdSgCeNUIn4w/2Taasw1vIw4y+5qlTL1s=
    =xEMN
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to Nicolas George on Wed May 21 11:50:01 2025
    On Wed, May 21, 2025 at 11:38:38AM +0200, Nicolas George wrote:
    [email protected] (HE12025-05-21):
    Actually, this makes a lot of sense (well, nearly): keep backup constantly synced, unmount/mount only on media rotation, carry freshly unmounted medium to safe place.

    It only becomes an effective backup at the time it is unmounted to move
    the medium to the safe place.

    Yes, but that is true for "conventional" backups, too. You only lessen
    the wait time, because the "last rsync" is potentially much faster.

    Cheers
    --
    t

    -----BEGIN PGP SIGNATURE-----

    iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCaC2gVgAKCRAFyCz1etHa RsRpAJ4oDroQNRanSR66nDG6kdfqtpAE2wCcD2DLUjM0nHnWMPUyQk9lGR0+oeE=
    =2FTp
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nicolas George@21:1/5 to All on Wed May 21 11:40:01 2025
    [email protected] (HE12025-05-21):
    Actually, this makes a lot of sense (well, nearly): keep backup constantly synced, unmount/mount only on media rotation, carry freshly unmounted
    medium to safe place.

    It only becomes an effective backup at the time it is unmounted to move
    the medium to the safe place.

    Regards,

    --
    Nicolas George

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Purgert@21:1/5 to Jonathan Dowland on Wed May 21 11:20:01 2025
    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
  • From Jonathan Dowland@21:1/5 to Nicolas George on Wed May 21 12:20:02 2025
    On Wed May 21, 2025 at 10:05 AM BST, Nicolas George wrote:
    Does it mean you like your backup drive to be permanently plugged to
    the computer? That protects you from hardware failures and human
    mistakes, but not from large physical damage or theft.

    This drive is permanently connected to this computer, yes: this
    computer's primary purpose is to be a backup server. I regularly sync
    this backup partition to a pair of external drives that live off-site.
    The full details of my scheme are at https://jmtd.net/computing/nas/

    --
    Please do not CC me for listmail.

    👱🏻 Jonathan Dowland
    [email protected]
    🔗 https://jmtd.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jonathan Dowland@21:1/5 to Dan Purgert on Wed May 21 12:30:01 2025
    On Wed May 21, 2025 at 10:09 AM BST, Dan Purgert wrote:
    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.

    Some mechanism is also needed to persist the previously-created
    namespace. I might need a PID hanging around to keep it defined.

    It would be really nice if systemd just supported this kind of thing. It
    has JoinsNamespaceOf= , which is very close: it's used for a secondary
    process to access the mount namespace of another, but only for the
    private /tmp created by PrivateTmp= , and not any other mounts.

    --
    Please do not CC me for listmail.

    👱🏻 Jonathan Dowland
    [email protected]
    🔗 https://jmtd.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)