Applescript for recognizing hard drive names (Chronosync)

I'm looking for a reliable, flexible and "idiot proof" backup system and am currently considering Chronosync for the job.
By "idiot proofing" the system I basically mean that the setup should keep track of source/destination drives in a multiple drive setup (I have a 4-bay Firewire enclosure and several removable hard drives each with a unique name) so I don't risk backing up to the wrong drives etc.
I've asked customer support at Chronosync if their software can detect hard drive names and was told it can't, but I could create an AppleScript that would prompt me to connect a drive, and set that as a pre-sync script in the Options Panel of ChronoSync, in the Scripts section.
Unfortunately I don't know much about Chronosync, nor do I have any knowledge of Applescripting. Does anyone here know of a readily available solution or have other suggestions?

I gave that script a short test... should work. =)
Remember to check (cancel on script error) because the script creates an error when you select "Cancel Backup" in it's dialogs:
-- 24.05.2011 hubionmac.com
-- can be added as as a pref-sync script to a  ChronoSync-Job to ask the user
-- to connect a missing source/destination volume if needed
--https://discussions.apple.com/thread/3075920
tell application "ChronoSync"
set mysource to leftTargetPath of document 1
set mydesti to rightTargetPath of document 1
if mysource starts with "/Volumes/" then
set mydelimiter to AppleScript's text item delimiters
set AppleScript's text item delimiters to "/"
set sourceName to text item 3 of mysource
set AppleScript's text item delimiters to mydelimiter
else
tell application "Finder" to set sourceName to name of startup disk
end if
if mydesti starts with "/Volumes/" then
set mydelimiter to AppleScript's text item delimiters
set AppleScript's text item delimiters to "/"
set destiName to text item 3 of mydesti
set AppleScript's text item delimiters to mydelimiter
else
tell application "Finder" to set destiName to name of startup disk
end if
tell application "Finder" to set drivenames to name of every disk
set cancelbackup to false
if sourceName is not in drivenames then
repeat until 1 = 0
set myaction to button returned of (display dialog "Source disk (" & sourceName & ") is not mountet!" buttons {"Check again!", "Cancel Backup"} default button 1 giving up after 30)
if myaction = "Check again!" then
tell application "Finder" to set drivenames to name of every disk
if sourceName is in drivenames then
exit repeat
end if
else
set cancelbackup to true
exit repeat
end if
end repeat
end if
if cancelbackup is false then
if destiName is not in drivenames then
repeat until 1 = 0
set myaction to button returned of (display dialog "Destination disk (" & destiName & ") is not mountet!" buttons {"Check again!", "Cancel Backup"} default button 1 giving up after 30)
if myaction = "Check again!" then
tell application "Finder" to set drivenames to name of every disk
if destiName is in drivenames then
exit repeat
end if
else
set cancelbackup to true
exit repeat
end if
end repeat
end if
end if
if cancelbackup is true then error "Canceling"
end tell

Similar Messages

  • How do you find the right replacement for a hard drive

    i have a 2007 macbook and the hard drive just went out and i want to find a new one that would be combatible

    For a new hard drive try Newegg.com http://www.newegg.com/Store/SubCategory.aspx?SubCategory=380&name=Laptop-Hard-Dr ives&Order=PRICE
    Or OWC for regular hard drives and SSDs  http://eshop.macsales.com/shop/hard-drives/2.5-Notebook/
    Here are instructions on replacing the hard drive in a MacBook with a removable battery. http://creativemac.digitalmedianet.com/articles/viewarticle.jsp?id=45088
    After you put in your new hard disk put your install DVD into the optical drive (CD/DVD drive) and reboot. Be sure to either use the disc that came with your Mac, or, if you installed a later Mac OS X version from disc, use the newer disc. As soon as you hear the boot chime, hold down the "c" key on your keyboard (or the Option Key until the Install Disk shows up) until the apple shows up. That will force your MacBook to boot from the install DVD in the optical drive.
    When it does start up, you'll see a panel asking you to choose your language. Choose your language and press the Return key on your keyboard once. It will then present you with an Installation window.
    Completely ignore this window and click on Utilities in the top menu and scroll down to Disk Utility and click it. You should see your hard drive in the left hand column along with your other drives. Click on the drive and select the Erase tab. Set the format value to Mac OS Extended (Journaled) and click the Erase button. After that has finished select the Partition tab. Type in a Name for your hard drive and select how many partitions you want from the Volume Scheme. The usual setting is one partition. Click on the Options button after you've selected a partition to make sure it's set for GUID. Then click the Apply button and after the Partitioning is done quit Disk Utility.
    You can now follow the instructions on the install screen

  • "revert" deleted hard drive name in disk utility HELP!!

    I booted my wifes macbook pro 10.4.11 in target mode and connected it to my computer, macbook pro 10.5.6 and went into my disk utility to create a partition in the other computer. I used my disk utility from 10.5.6 because for some reason it got erased from the 10.4.11
    so I started to do 2 partitions. It said there was not enough room so I clicked on "revert" and for some reason the name of the "macintosh hd" disappeared and I ejected the computer in target mode. Then when I tried to start it up, it just kept flashing a folder with a question mark. I booted again in target mode but still no "indented" "macintosh hd". it seems like it came unmounted maybe?
    I have tried starting from x key, resetting pram, trying to load from install disc (which gets to the point where it asks where to install the OS and no HD shows up to choose) and even taking it to the apple store where they said the HD is damaged and/or corrupt. Before trying to reclaim the files, if I can, I wanted to see if anyone had this same issue and if it was solvable. I cant believe that I hit "revert" and it erased my hard drive name and it automatically made my HD corrupt or damaged?
    PLEASE help anyone!
    or if this is a lost cause, is there a good file recovery program where I can get my WIFES files back! Yeah, I am in trouble.
    Thanks!

    If anything can be recovered at all, you should quit using the computer asap. The more you use it the more OSX will write over those spots where the files were.
    Data Rescue II...
    http://www.prosofteng.com/products/data_rescue.php
    (Has a Free Demo to see if it could or not, but you'll need another drive to recover to).
    Or FileSalvage...
    http://www.subrosasoft.com/OSXSoftware/index.php?%20mainpage=product_info&productsid=1
    to recover what you can.
    BUT, you'll need that other Mac with this one in FW Target Mode
    BTW, don't use Leopards Disk Utility to do anything to a Tiger Hard Drive.

  • My iMac hard drive name is just backslashes

    I have an iMac running OS X 10.9.4

    Could be some accident, keyboard commands were chosen & highlighted
    the icon of desktop items, and then later, if finder/desktop was clicked or
    somehow became the default window, bumping any key could do it.
    You can choose desktop items all by keyboard action, + click enter to open
    in some instances. There are several shortcuts going way back to early
    Mac OS that still do things. Not necessarily the same things in OS X.
    Cycling through several items on the desktop by up/down is then possible;
    if you happen across the correct keys, even by accident.
    {Kids are almost famous for choosing Accessibility preferences; such as
    those to turn the desktop into a chalkboard negative effect}
    Not sure if you can lock a hard drive name (as you can an application)
    in the case of my Macs hard drives, the shorter name in-icon uses HD
    or HDD to avoid longer name issues.
    I've had a few dozen/dozen Macs and some of these kinds of things are
    not so new to me. On rarer occasion, a few others can still be strange...
    Good luck & happy computing!
    edited

  • I have one HDMI port on my television that is currently used for my hard drive/free view box.  What kind of adaptor can I buy so I can have the hard drive and my apple tv device plugged into the same HDMI PORT?

    I have one HDMI port on my television that is currently used for my hard drive/free view box.  What kind of adaptor can I buy so I can have the hard drive and my apple tv device plugged into the same HDMI PORT? Is it a switch or a splitter?  And where is it best to buy one?  Thanks!

    Welcome to the Apple Community.
    You need an HDMI switch.

  • On my Macbook pro 15 2011, System Profiler is suggesting that it uses SATA III for the hard drive and SATA II for the Optical Drive.  Is that true?

    On my Macbook pro 15, 2011, System Profiler is suggesting that it uses SATA III for the hard drive and SATA II for the Optical Drive.  Is that true?

    That is correct. The tech specs indicate:
    Hard Drive Interface
    6.0 Gbps Serial ATA (SATA)
    Optical Drive Interface
    3.0 or 6.0 Gbps Serial ATA (SATA)

  • Once I upgraded to ML, I'm now finding that my Seagate Free Agent external hard drive is no longer being backed up by Time machine.  Do I have to wait for Seagate to update their drivers for this hard drive?

    Once I upgraded to ML, I'm now finding that my Seagate Free Agent external hard drive is no longer being backed up by Time machine.  Do I have to wait for Seagate to update their drivers for this hard drive?

    I tried your suggestion, and it's been giving me the message "Preparing for Backup" for the past 8 hours.  Does this mean TM is backing up my hard drive?  I'll give it a few more hours, but if nothing else happens, I'm not sure what else to do.  I'm not sure if there are any new external hard drives that are compatible with ML yet. 

  • Hard Drive name changed on it's own.

    Hi there.
    On starting my Mac Mini this morning I noticed that the hard drive name had changed from "Mac HD" to "/" without any input from myself.
    does anyone have an idea what may have occured ?
    Thank's.

    Try using GrandPerspective to see what's taking up all the space.
    Also, make sure everything you don't need is turned off under Sharing; it's possible that you left file sharing on without a password and someone is taking advantage of that.
    If you have a MobileMe account, do you have iDisk Syncing turned on? Or something similar if you have Dropbox or another similar service?

  • HT1661 My mid-2009 MacBook Pro has just died via a painful (for me) hard drive failure. I backed up a good percentage of files recently but not enough to keep me happy.  I need to access the dead drive on the MBP via a 2008 iMac. Best options?

    My mid-2009 MacBook Pro has just died via a painful (for me) hard drive failure. I backed up a good percentage of files recently but not enough to keep me happy.  I need to access the dead drive on the MBP via a 2008 iMac. Best options?
    I have ordered a 800 firewire to 800 firewire cable and am hoping to use the target mode option to copy files from the MBP.
    Is this possible?
    Hope so!
    Any advice and or help would be greatly appreciated.
    Many thanks,
    Neil

    Thanks Ogelthorpe.
    Just bought an enclosure to try that also.
    Hoping the MBP isn't really dead but just feigning death
    Fingers crossed.

  • I have a late 2011 mac book pro and I'm wondering if it uses SATA II or SATA III for the hard drive? Which eventually I'm going to replace with a SSD.

    I was wondering if the late 2011 macbook pro uses SATA II or SATA III for the hard drive. The reseason I'm asking this is because some day I'm going to replace the Hard drive for a SSD drive down the road and would like to use all the performance of the SATA controler.

    SATA III.

  • How do you display the capacity/free space for the hard drive......

    How do you display the capacity/free space for the hard drive on the desktop, under the hard drive icon.... I have seen this done, but I am not seeing any options to do so.... thanks.

    View, Show View Options…, Show item info checkbox.

  • Recommendations needed for portable hard drives

    Looking for a recommendation for portable hard drives -
    1. I'm buying a new 2TB portable hard drive to use with my iMac for my Time Machine backups.
    2. Additionally, I am buying a second 2TB portable HD for the iMac for SuperDuper back ups (I'm adding a second layer of back up and bootable clone protection to my life).
    3. Finally, I need to also purchase a 1TB portable HD for SuperDuper back ups for my MacBook Air.
    I'd just as soon keep life simple and buy the same brand for all 3 drives. I want things easy.
    (I have Mavericks on both computers and don't want to worry about Western Digital software inadvertently being installed without my knowing it, possible causing me to lose data on my computers. So maybe it would be simplest all around to avoid WD?)
    Simple and easy and reliable - that's all I ask.

    Information.
    Best external hard drive?

  • Scheduling backup for external hard drive?

    I purchased a seagate freeagent desk external hard drive that is already formatted for Mac. It did not come with any software and connects fine to my powerbook G4. I am wondering which application I can use to set an automatic backup schedule for this hard drive? I can manually drag and drop, but prefer to set an automatic schedule. Does anyone know how to do this?

    If your PowerBook meets the technical specs for Leopard, you could install that and then use Time Machine:
    http://www.apple.com/macosx/techspecs/
    Good luck!

  • Thunderbolt Dock for External Hard Drive

    Hi there,
    I'm trying to find a Thunderbolt Dock for External Hard Drive.
    One of these http://www.topbuy.com.au/tbcart/pc/External-SATA-Hard-Drive-Docking-Station-USB- Interface-937p3180.htm
    But with Thunderbolt connector instead of USB, Firewire, eSATA etc.
    Do these exist?
    The only thing I could find close is the Seagate Go Flexi Adapter, but that only works for those drives.
    Thanks,
    Grant

    I would suggest this:
    http://www.belkin.com/thunderbolt/
    It will do more than you need and require, and you still would need to get an eSATA docking station, but that's what you really want anyways. 
    Thunderbolt is a bleeding edge tech still (as evidenced but the fact that nobody yet has a good dock for it) but if you go the modular approach you can still pickup your docking station with eSATA and FW800 and USB etc. and take it to a friend's and have more chance of being able to plug it in.  and since you're getting a dock and not a drive you want it PC/Mac friendly because you can swap drives to ones formatted for the system.  Plus this accessory will be really great if you ever get a Mac Book Air or Retina Display MB Pro that just don't have ethernet or eSATA or even firewire anymore.
    And i know that tbolt is faster than eSATA natively, but if you're plugging in a SATA HD then, well i don't think i need to finish that sentance.

  • Mac hard drive name

    Why is the name of my hard drive \][poiuytrewq`\ ?  The symbols seem to be causing a conflict with MAC Office 2011.  Has anyone had this issue?

    When I attempt to open an Excel file, I get an error message indicating invalid path name...that it contains a symbol like \.  I've never updated my hard drive name, unless it happened when my computer was being repaired at Apple.  I've only had 2 repairs done to it:  the cd drive replaced and a small board that controls the battery charging.
    I can change the name of the hard drive to something like MAC_HD_MSilva, but I wanted to make sure this wouldn't cause any issues.  From reading posts...the name doesn't seem to matter.

Maybe you are looking for

  • Video no longer plays after adding 'effects', it's audio only

    So I've used imovie 09 for months and everything has worked fine. Then today Iw as working on a video and added an effect to a clip and all **** broke loose. Now the video won't show up for every clip - it's audio only. I've tried closing imovie and

  • Minus Sign in the Downloaded DME file using F110 Transaction

    Hi All, From the F110 Transaction I navigate to the DME Administration from the menu bar in order to download the DME file into my system. I could open the txt file that is downloaded. Now my requirement is to add a minus sign to the invoice amount o

  • How to change table RSRPARAMETRIZA manually

    Dear friend, I would like to schedule some of our report using broadcast. to change variables value dynamically we create variants and now i want to change the values of those variabels using program. For this purpose i followign this link. Re: abap

  • Sound not working in iTunes only

    For awhile after downloading the newest iTunes 7 version everything was going well, until one day I restarted my computer and now I don't have sound. Everything runs and plays correctly, but there's no sound. I know there's nothing wrong with my spea

  • Since llast upgrade, Firefox closes unexpectedly when I type in textboxes. WTF?

    Since going to version 3.6.6, Firefox often closes as soon as I start to type in a textbox. Not every time. At first I thought I might be accidentally mistyping a CTRL+ prompt, but no, it has happened with strokes on any kind of key. Frequently Firef