Gentoo Archives: gentoo-user

From: Wols Lists <antlists@××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: OT: cleanup after USB backup drive unplugged?
Date: Fri, 12 Jan 2018 16:42:41
Message-Id: 5A58E571.8050408@youngman.org.uk
In Reply to: [gentoo-user] Re: OT: cleanup after USB backup drive unplugged? by Grant Edwards
1 On 12/01/18 15:39, Grant Edwards wrote:
2 >> I usually also include a check to ensure that some file/directory
3 >> > exists which I expect to be on the drive, which prevents the backup
4 >> > script from dumping a full backup into your mountpoint if it isn't
5 >> > mounted (possibly on a filesystem with insufficient space -
6
7 > Yep, that's being done. The backup won't attempt to run if the
8 > external drive isn't mounted.
9
10 Dunno quite how it works, but you could automate everything through
11 udev. When I stick something in, KDE offers to mount it for me, in
12 /run/media/$USER/abcd-efgh.
13
14 I think that last bit is unique to the media, and the same every time,
15 so you could make udev detect that something's been plugged in and, if
16 it's your backup drive, auto-run the backup.
17
18 Or, of course, if your backup expects the drive at that location, it
19 simply refuses to run if that location doesn't exist.
20
21 Cheers,
22 Wol

Replies

Subject Author
[gentoo-user] Re: OT: cleanup after USB backup drive unplugged? Grant Edwards <grant.b.edwards@×××××.com>
Re: [gentoo-user] Re: OT: cleanup after USB backup drive unplugged? Neil Bothwick <neil@××××××××××.uk>