DISQUS

TNT Luoma: SuperDuper Bash Script to Automatically Mount or Unmount a Hard Drive

  • Scott A · 9 months ago

    You'd probably also want to make sure that the drive name is unique, so you don't get it mounting with a trailing number that may not correspond to the script.

  • Fred · 7 months ago

    I get the error:


    | Error | /Users/Fred/mount-drive-for-superduper.sh: line 42: /Users/Fred/.source: No such file or directory


    What is this invisible file? And how can I generate it? Thank you for your help.

  • @luomat · 7 months ago

    OOps.


    My bad. You can simply run this command:


    touch ~/.source

  • Patrick Crowley · 7 months ago

    Awesome script! This was exactly what I needed. :)

  • Louis · 5 months ago

    Can you please explain were i will save the file: (mount-for-superduper.sh)
    in your instructions, you say to save it to: ( ~/bin/ or somewhere else in your $PATH)
    but were is that.


    What I did is to save it to" (Copy scripts file) inside the Resources of SuperDuper
    but I am getting this message: Scripts/unmount-for-superduper.sh
    | 05:28:15 PM | Error | sh: /Applications/SuperDuper!.app/Contents/Resources/Copy Scripts/unmount-for-superduper.sh: Permission denied
    Can you please help me.
    Thank you
    Louis

  • @luomat · 5 months ago

    a) I don't think my script is necessary. The developer said that SuperDuper will automatically mount/unmount the drive if needed


    b) ~ is a Unix short cut for $HOME


    c) You probably need to get into Terminal and paste this command (including the " marks!) Make sure it is ALL ONE LINE:


    chmod 755 "/Applications/SuperDuper!.app/Contents/Resources/Copy Scripts/unmount-for-superduper.sh"

  • Graham Street · 5 months ago

    Excellent script, thanks. I clone my main drive to a backup in my Mac Pro every evening. Your script will solve a problem I've had for a while where everything's duplicated in 'Launch Services' because OSX finds all the duplicate applications on my clone drive. The only thing I can't solve is that the disk mount requests my password, and therefore I can't leave the automatic clone update to run unattended. Do you have any suggestions for this?

  • @luomat · 5 months ago

    Hrm. I don't know why it requests your password. I used that command specifically because it does not request my password. Sorry I don't have an answer.