Re: mounting backup filesystem on-demand (was Re: Checking for a mount in a shell script)

2025-05-21 Thread Jonathan Dowland
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 ot

Re: mounting backup filesystem on-demand (was Re: Checking for a mount in a shell script)

2025-05-21 Thread Jonathan Dowland
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 co

Re: mounting backup filesystem on-demand (was Re: Checking for a mount in a shell script)

2025-05-21 Thread tomas
On Wed, May 21, 2025 at 11:38:38AM +0200, Nicolas George wrote: > to...@tuxteam.de (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

Re: mounting backup filesystem on-demand (was Re: Checking for a mount in a shell script)

2025-05-21 Thread Nicolas George
to...@tuxteam.de (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 s

Re: mounting backup filesystem on-demand (was Re: Checking for a mount in a shell script)

2025-05-21 Thread tomas
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 h

Re: mounting backup filesystem on-demand (was Re: Checking for a mount in a shell script)

2025-05-21 Thread Nicolas George
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

Re: mounting backup filesystem on-demand (was Re: Checking for a mount in a shell script)

2025-05-21 Thread Dan Purgert
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

mounting backup filesystem on-demand (was Re: Checking for a mount in a shell script)

2025-05-21 Thread Jonathan Dowland
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 th

Re: Checking for a mount in a shell script

2025-05-20 Thread tomas
On Tue, May 20, 2025 at 11:35:14AM -0400, Lee wrote: > On Tue, May 20, 2025 at 10:08 AM tomas wrote: > > > > On Tue, May 20, 2025 at 09:45:11AM -0400, Lee wrote: > > > On Tue, May 20, 2025 at 9:33 AM wrote: > > > > [...] > > > > > > What do you do if you get two USBs containing file systems with >

Re: Checking for a mount in a shell script

2025-05-20 Thread Lee
On Tue, May 20, 2025 at 10:08 AM tomas wrote: > > On Tue, May 20, 2025 at 09:45:11AM -0400, Lee wrote: > > On Tue, May 20, 2025 at 9:33 AM wrote: > > [...] > > > > What do you do if you get two USBs containing file systems with > > > the same UUID? > > > > Is that possible? I suppose it is.. so I'

Re: Checking for a mount in a shell script

2025-05-20 Thread tomas
On Tue, May 20, 2025 at 10:50:50AM -0400, 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, th

Re: Checking for a mount in a shell script

2025-05-20 Thread Dan Purgert
On May 20, 2025, Lee wrote: > On Tue, May 20, 2025 at 6:00 AM Jonathan Dowland wrote: > > > > On Tue May 20, 2025 at 6:41 AM BST, Kamil Jońca wrote: > > > why not > > > if ! mountpoint /mnt/usb-drive-b ; then ... > > > ? > > > > I'd not heard of either `mountpoint` or `findmnt` before. I see they'

Re: Checking for a mount in a shell script

2025-05-20 Thread tomas
On Tue, May 20, 2025 at 09:45:11AM -0400, Lee wrote: > On Tue, May 20, 2025 at 9:33 AM wrote: [...] > > What do you do if you get two USBs containing file systems with > > the same UUID? > > Is that possible? I suppose it is.. so I'd go looking for how to > change the UUID for one of the usb dr

Re: Checking for a mount in a shell script

2025-05-20 Thread Lee
On Tue, May 20, 2025 at 9:33 AM wrote: > > On Tue, May 20, 2025 at 09:30:37AM -0400, Lee wrote: > > On Tue, May 20, 2025 at 6:00 AM Jonathan Dowland wrote: > > > > > > On Tue May 20, 2025 at 6:41 AM BST, Kamil Jońca wrote: > > > > why not > > > > if ! mountpoint /mnt/usb-drive-b ; then ... > > > >

Re: Checking for a mount in a shell script

2025-05-20 Thread tomas
On Tue, May 20, 2025 at 09:30:37AM -0400, Lee wrote: > On Tue, May 20, 2025 at 6:00 AM Jonathan Dowland wrote: > > > > On Tue May 20, 2025 at 6:41 AM BST, Kamil Jońca wrote: > > > why not > > > if ! mountpoint /mnt/usb-drive-b ; then ... > > > ? > > > > I'd not heard of either `mountpoint` or `fin

Re: Checking for a mount in a shell script

2025-05-20 Thread Lee
On Tue, May 20, 2025 at 6:00 AM Jonathan Dowland wrote: > > On Tue May 20, 2025 at 6:41 AM BST, Kamil Jońca wrote: > > why not > > if ! mountpoint /mnt/usb-drive-b ; then ... > > ? > > I'd not heard of either `mountpoint` or `findmnt` before. I see they're > both part of util-linux, so I guess as

Re: Checking for a mount in a shell script

2025-05-20 Thread Jonathan Dowland
On Tue May 20, 2025 at 6:41 AM BST, Kamil Jońca wrote: why not if ! mountpoint /mnt/usb-drive-b ; then ... ? I'd not heard of either `mountpoint` or `findmnt` before. I see they're both part of util-linux, so I guess as likely as each other to be available (which is one criterion I would use

Re: Checking for a mount in a shell script

2025-05-19 Thread Kamil Jońca
Andy Smith writes: > Hi, > > On Sun, May 18, 2025 at 12:47:25PM -0400, Default User wrote: >> Since I know almost no shell scripting, the rsync usb drive A  >> to usb drive B copy is done with a simple bash script consisting >> only of the rsync backup command, with options and parameters, but >

Re: Checking for a mount in a shell script (Was: Re: Preparing for Debian 13)

2025-05-19 Thread Lee
On Mon, May 19, 2025 at 3:22 PM Dan Purgert wrote: > > On May 19, 2025, Lee wrote: > > On Sun, May 18, 2025 at 8:03 PM Greg Wooledge wrote: > > > > > > On Sun, May 18, 2025 at 19:51:04 -0400, Lee wrote: > > > > On Sun, May 18, 2025 at 4:51 PM Andy Smith wrote: > > > > > > > > > > Hi, > > > > > > >

Re: Checking for a mount in a shell script (Was: Re: Preparing for Debian 13)

2025-05-19 Thread Dan Purgert
On May 19, 2025, Lee wrote: > On Sun, May 18, 2025 at 8:03 PM Greg Wooledge wrote: > > > > On Sun, May 18, 2025 at 19:51:04 -0400, Lee wrote: > > > On Sun, May 18, 2025 at 4:51 PM Andy Smith wrote: > > > > > > > > Hi, > > > > > > > > On Sun, May 18, 2025 at 12:47:25PM -0400, Default User wrote: > >

Re: Checking for a mount in a shell script (Was: Re: Preparing for Debian 13)

2025-05-19 Thread Lee
On Sun, May 18, 2025 at 8:03 PM Greg Wooledge wrote: > > On Sun, May 18, 2025 at 19:51:04 -0400, Lee wrote: > > On Sun, May 18, 2025 at 4:51 PM Andy Smith wrote: > > > > > > Hi, > > > > > > On Sun, May 18, 2025 at 12:47:25PM -0400, Default User wrote: > > > > Since I know almost no shell scripting,

Re: Checking for a mount in a shell script (Was: Re: Preparing for Debian 13)

2025-05-18 Thread Greg Wooledge
On Sun, May 18, 2025 at 19:51:04 -0400, Lee wrote: > On Sun, May 18, 2025 at 4:51 PM Andy Smith wrote: > > > > Hi, > > > > On Sun, May 18, 2025 at 12:47:25PM -0400, Default User wrote: > > > Since I know almost no shell scripting, the rsync usb drive A > > > to usb drive B copy is done with a simpl

Re: Checking for a mount in a shell script (Was: Re: Preparing for Debian 13)

2025-05-18 Thread Lee
On Sun, May 18, 2025 at 4:51 PM Andy Smith wrote: > > Hi, > > On Sun, May 18, 2025 at 12:47:25PM -0400, Default User wrote: > > Since I know almost no shell scripting, the rsync usb drive A > > to usb drive B copy is done with a simple bash script consisting > > only of the rsync backup command, wi

Re: Checking for a mount in a shell script (Was: Re: Preparing for Debian 13)

2025-05-18 Thread Default User
Thanks, Andy! I'll give it a try.

Checking for a mount in a shell script (Was: Re: Preparing for Debian 13)

2025-05-18 Thread Andy Smith
Hi, On Sun, May 18, 2025 at 12:47:25PM -0400, Default User wrote: > Since I know almost no shell scripting, the rsync usb drive A  > to usb drive B copy is done with a simple bash script consisting > only of the rsync backup command, with options and parameters, but > without any code to verify t