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. 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. 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |