Gentoo Archives: gentoo-user

From: Grant Edwards <grant.b.edwards@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: OT: cleanup after USB backup drive unplugged?
Date: Fri, 12 Jan 2018 16:57:05
Message-Id: p3ap89$e96$1@blaine.gmane.org
In Reply to: Re: [gentoo-user] Re: OT: cleanup after USB backup drive unplugged? by Wols Lists
1 On 2018-01-12, Wols Lists <antlists@××××××××××××.uk> wrote:
2 > On 12/01/18 15:39, Grant Edwards wrote:
3
4 >>>> I usually also include a check to ensure that some file/directory
5 >>>> exists which I expect to be on the drive, which prevents the
6 >>>> backup script from dumping a full backup into your mountpoint if
7 >>>> it isn't mounted (possibly on a filesystem with insufficient
8 >>>> space -
9 >
10 >> Yep, that's being done. The backup won't attempt to run if the
11 >> external drive isn't mounted.
12 >
13 > Dunno quite how it works, but you could automate everything through
14 > udev.
15
16 Yes, that's what I was doing.
17
18 The original question was what action should udev take when a USB
19 drive is unplugged. As somebody pointed out, it's probably safer to
20 explicity mount the drive as part of the backup operation then unmount
21 when the backup is finished. Now, instead of having udev mount the
22 drive when it's plugged in, the backup script handles that.
23
24 > Or, of course, if your backup expects the drive at that location, it
25 > simply refuses to run if that location doesn't exist.
26
27 Right.
28
29 --
30 Grant Edwards grant.b.edwards Yow! Is it NOUVELLE
31 at CUISINE when 3 olives are
32 gmail.com struggling with a scallop
33 in a plate of SAUCE MORNAY?