On 2018-01-12, Wols Lists <antli...@youngman.org.uk> wrote:
> On 12/01/18 15:39, Grant Edwards wrote:

>>>> I usually also include a check to ensure that some file/directory
>>>> exists which I expect to be on the drive, which prevents the
>>>> backup script from dumping a full backup into your mountpoint if
>>>> it isn't mounted (possibly on a filesystem with insufficient
>>>> space -
>
>> Yep, that's being done.  The backup won't attempt to run if the
>> external drive isn't mounted.
>
> Dunno quite how it works, but you could automate everything through
> udev.

Yes, that's what I was doing.

The original question was what action should udev take when a USB
drive is unplugged.  As somebody pointed out, it's probably safer to
explicity mount the drive as part of the backup operation then unmount
when the backup is finished.  Now, instead of having udev mount the
drive when it's plugged in, the backup script handles that.

> Or, of course, if your backup expects the drive at that location, it
> simply refuses to run if that location doesn't exist.

Right.

-- 
Grant Edwards               grant.b.edwards        Yow! Is it NOUVELLE
                                  at               CUISINE when 3 olives are
                              gmail.com            struggling with a scallop
                                                   in a plate of SAUCE MORNAY?


Reply via email to