On 2018-01-12, Rich Freeman <ri...@gentoo.org> wrote: > On Fri, Jan 12, 2018 at 6:39 AM, Mick <michaelkintz...@gmail.com> wrote: >> On Friday, 12 January 2018 09:58:17 GMT Adam Carter wrote: >>> >>> Pretty sure you'd risk filesystem corruption by not umounting >>> before you remove the device.
That's why I don't do that. > This is all somewhat orthogonal to your original question though - > these are all things that you ought to do before you remove the > device, not after. Quite. > One thing I tend to do with scripts for backups to external devices > that I don't intend to leave mounted is build the mount and umount > into the backup script itself. Good point. That's probably what I should be doing instead of having udev mount the drive when it's plugged in. I think I'll work on that in my spare time. If I label the partition in question, it should be pretty simple... > 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. -- Grant Edwards grant.b.edwards Yow! Inside, I'm already at SOBBING! gmail.com