killoho.blogg.se

Mount hard drive mac os
Mount hard drive mac os












mount hard drive mac os

I had a similar dillema, although in my situation it was a network file server who had a dedicated Backup drive. This lessens the likelihood of disk corruption. Unmounting between syncs also allows the user to yank the firewire (or USB) cable without ejecting the disk. More importantly, I need a "busy" UI that a) informs when the sync is running and b) allows one to interrupt when needed. I will probably be adding mount/unmount at some point. So I look for the disk UUID, and that the target directory is present. And if that happens at the same time another device is using the same device name you have a problem. I found that without a good sanity check rsync would mirror my directory back onto the local disk in "/Volumes" because automount sometimes leaves a directory behind after the volume is unmounted.

mount hard drive mac os

I am not yet mounting/unmounting my disk but I am using `/usr/sbin/diskutil info /Volumes/ROCSTOR | grep UUID | awk '' | grep xxxx-xxxxxx-xxxxxx-xxxxxx` to verify the script only runs when the exact disk volume needed is there. I have been working on an rsync script and I believe you will find that the device name will change depending on the circumstances. I've looked at the history of my backups and found that it always finishes in less than 10 minutes. Also, make sure that the unmounting time is somewhat beyond the time that your backups regularly finish. Note that this won't be effective if you're backing up to a drive with more than one partition.

mount hard drive mac os

In terminal, type crontab -e, type i (insert), then paste. If you're unfamiliar with the vi editor in Terminal, select all of the text above and copy it. Adjust the times accordingly, particularly the unmount time if you have longer backups. The second line will unmount the disk at 4:15am. Replace the end of the second line, '/Volumes/The Annex' with '/Volumes/name of your backup hard drive' (the quotes will handle any spaces in the drive's name).Īssuming that I do a backup at 4am, the first line will mount the disk at 3:59am. Replace the end of the first line, disk1s10 with the drive identifier from step one. Edit your crontab to contain the lines:ĥ9 3 * * * /usr/sbin/diskutil mount /dev/disk1s10ġ5 4 * * * /usr/sbin/diskutil eject '/Volumes/The Annex'.Select Info, and make note of the Disk Identifier.With the drive mounted, open Disk Utility and select the drive partition that will be the destination of the backup.Instead, I prefer to mount/unmount the drive just prior to and after Backup runs, so that's it's not in the way when I don't need it. Problem is that I don't like having it mounted all of the time, since it spins up whenever I save or open a document, etc. I use Apple's Backup program to back up files from my computer every night to an external hard drive (that has only one partition) reserved for backups.














Mount hard drive mac os