Hi,
Context
I am trying to set up my drives for an automated backup workflow using Carbon Copy Cloner.
I didn't want the cloned drives mounted all the time - just when they are to be backed up.
I edited the fstab file through terminal to noauto mount the backup drives on boot.
I set up some small scripts to mount a drive.
Set these to launch from iCal 15 mins before CCC clones it.
Then once the clone is complete CCC also unmounts that drive before moving onto the next clone job.
The Problem
The issue I have is that the script I am using to mount the drive is referring to the Disk Identifier of each drive which is apparently changing when I reboot, or unplug and replug the drives in a different usb port - I'm on a macbook.
The script is:
The disk identifier is obtained from the info in disk utility and is correct at that time as I have tested it and it works. - but after reboot etc, the DI has changed.
The solution
How can I modify the script to mount using the disk UUI (UUID) instead which is unique and always constant.
Alternatively how can I set the Disk Identifier of these drives to always mount to a specific number which is reserved for that drive only?
Context
I am trying to set up my drives for an automated backup workflow using Carbon Copy Cloner.
I didn't want the cloned drives mounted all the time - just when they are to be backed up.
I edited the fstab file through terminal to noauto mount the backup drives on boot.
I set up some small scripts to mount a drive.
Set these to launch from iCal 15 mins before CCC clones it.
Then once the clone is complete CCC also unmounts that drive before moving onto the next clone job.
The Problem
The issue I have is that the script I am using to mount the drive is referring to the Disk Identifier of each drive which is apparently changing when I reboot, or unplug and replug the drives in a different usb port - I'm on a macbook.
The script is:
Code:
do shell script "diskutil mount /dev/disk4s2"
The disk identifier is obtained from the info in disk utility and is correct at that time as I have tested it and it works. - but after reboot etc, the DI has changed.
The solution
How can I modify the script to mount using the disk UUI (UUID) instead which is unique and always constant.
Alternatively how can I set the Disk Identifier of these drives to always mount to a specific number which is reserved for that drive only?