[lug] quick bash mount and rmt questions

Bear Giles bgiles at coyotesong.com
Tue Oct 15 08:03:35 MDT 2019


A few quick questions since I've been reviewing my backup scripts...

1. Is there a way for my bash script to be conditional on whether a disk is
mounted? It's partly security (only mount disks when required), partly to
ensure that I don't exhaust my disk space since I didn't notice the NFS
/backups directory wasn't mounted. I know I could create a sentinel file
that's only present in the mounted partition (or vice versa) and do a test
for existence but is there another way using the mount subsystem?

2. Are there 'rmt' apps that write to disk instead of tape? It might to do
some deep packet inspection to extract the 'label' from the data stream.
It's fine if it's write-only.

... or I might just (finally) write a simple webapp and client. I want to
create standard files - .tar or .zip - but want the backup tool to be
write-only and append-only. I can retrieve the file directly if I need to
do a restore the partition. That avoids the problem of malware that walks
the filesystem and deletes or encrypts everything - including backup media.
I can easily create .tar or .zip files, encrypt them, and even upload them
to S3. The client would only need to be able to walk the filesystem and
make simple REST calls to the server.

Bear
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20191015/6bcad932/attachment.html>


More information about the LUG mailing list