network – Best practice for mounting drives for automation

Spread the love


I'm writing a backup script which I would like to automatically mount certain drives, back up anything new, and then unmount them. In this case it's a specialized network storage called an Avid Nexis used in post production, mounted via mount -t avid (I don't think I can use diskutil for this, if it matters).


Is there a way to mount a drive so that only my backup script can see/use it?

Right now, I'm having trouble if the drive is mounted and unmounted too quickly, because I get a “Resource Busy” error when umounting it. I'm assuming other things have noticed a new drive mounted and are checking it out at the same time I'm trying to unmount.

Author: Subham

Leave a Reply

Your email address will not be published. Required fields are marked *