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 |