Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > Time Machine at home and at work

Time Machine at home and at work
Thread Tools
philm
Mac Elite
Join Date: May 2001
Location: Manchester, UK
Status: Offline
Reply With Quote
Jan 14, 2009, 07:40 AM
 
My trusty MacBook is with me all the time, at home and at the office. I have an external HD set up at home for TM back ups when I am there. I'd like to also do a back-up at work (multiple back-ups, different locations, you get the idea).

I don't see how I can use TM to do both. Any thoughts on how this might be achievable? Otherwise, I guess I use TM at home and some other back-up solution at work.
     
vwgtiturbo
Forum Regular
Join Date: Feb 2007
Status: Offline
Reply With Quote
Jan 16, 2009, 03:19 AM
 
Hello, I do the same thing. I have a TM drive at home and one at work. Time Machine is perfectly capable of using multiple disks, HOWEVER, normally, you have to enter the System Preferences and change the Time Machine disk anytime you hook up a new one (e.g. so when you get to the office and hook up the work drive, you would have to select 'Change Disk' in the TM section of the System Preferences, and then have to do it again when you get home and hook up the home TM drive). Me, always looking to streamline, did some research online, and found that some grand soul had already figured it out.

Here is what I do to make this work. When formatting each drive, I give them a unique name (e.g. Home Time Machine, and Work Time Machine).

Here is the script I found online during my search for this answer, but in order to use it, you need to enable 'GUI Scripting'. Open the 'AppleScript Utility' on your system and check enable GUI scripting.

Open 'Script Editor' on your system and paste this into it (between, but not including the dashed lines!):

---------------------------------------------



set primarydrivename to "Home Time Machine"
set secondarydrivename to "Work Time Machine"

register_growl()

activate application "System Preferences"
tell application "System Events"
tell process "System Preferences"
click menu item "Show All Preferences" of menu 1 of menu bar item "View" of menu bar 1
click button "Time Machine" of scroll area 1 of window "System Preferences"
repeat until exists window "Time Machine"
delay 0.2
end repeat
click button 1 of group 1 of window "Time Machine" -- change disk
(* If primary disk is mounted switch to it, otherwise switch to secondary disk *)
repeat until exists sheet 1 of window "Time Machine"
delay 0.2
end repeat

set tablecontents to (rows of table 1 of scroll area 1 of sheet 1 of window "Time Machine")
set rownumber to 0
set primarydriveavailable to false
repeat with tablerow in tablecontents
set rownumber to rownumber + 1
set volumename to value of static text of row rownumber of table 1 of scroll area 1 of sheet 1 of window "Time Machine"
log volumename
if volumename as string is primarydrivename then
set primarydriverownumber to rownumber
set primarydriveavailable to true
else if volumename as string is secondarydrivename then
set secondarydriverownumber to rownumber
end if
end repeat
try
if primarydriveavailable is true then
set desiredrownumber to primarydriverownumber
else
set desiredrownumber to secondarydriverownumber
end if
set volumename to value of static text of row desiredrownumber of table 1 of scroll area 1 of sheet 1 of window "Time Machine"

select row desiredrownumber of table 1 of scroll area 1 of sheet 1 of window "Time Machine"
click button "Use for Backup" of sheet 1 of window "Time Machine"
set message to "Time Machine has ben set to backup to " & volumename
my growlnote("General Notification", message)

on error
set message to "Time Machine preferences were not changed"
my growlnote("error notification", message)
end try

delay 1 -- wait for a confirmation dialog that appears if you select a partition on the same physical disk as that being backed up
if (exists button "Use Selected Disk" of window 1) then
click button "Use Selected Disk" of window 1
end if

click menu item "Quit System Preferences" of menu 1 of menu bar item "System Preferences" of menu bar 1
end tell
end tell

on register_growl()
try
tell application "GrowlHelperApp"
set the allNotificationsList to {"General Notification", "Debug Notification", "Error Notification"}
set the enabledNotificationsList to {"General Notification", "Debug Notification", "Error Notification"}
register as application "Configure TimeMachine" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "TimeMachine"
end tell
end try
end register_growl

on growlnote(growltype, str)
try
tell application "GrowlHelperApp"
notify with name growltype title growltype description str application name "Configure TimeMachine"
end tell
end try
end growlnote



------------------------------------------

In the script above, change each instance of 'Home Time Machine' and 'Work Time Machine' to the respective names of your two TM drives. Save the altered script with 'File>Save As...' and choose a filename, while also choosing the 'Application' file format.

Lastly, download 'Do Something When'. Install it, then go into the System Preferences, choose 'DSW' and set up the rules similar to this:

Do Something When Setup

Change the 'When' to whatever you named your two TM drives (you will need to make a DSW rule for each TM drive you have), then change 'What>Open...' and navigate to the Application that you saved with Script Editor. Note that although you have two TM drives and two DSW rules, you still use ONE application/script to change the TM setting (e.g. you don't need two copies of the Application for this to work).

That's it. Now, when you hook up either of your drives, don't use the mouse for a few seconds, as the above script uses the GUI and any clicks you do on the mouse will invalidate the actions of the script. From now on, when you attach the drives, the System Preferences will open automatically, the Time Machine section will open, and the script will change disks for you. It will then close the System Preferences, and even give you a Growl notification (if you have Growl installed). Keep in mind that your first backup to each TM drive will seem to take years...

If you have any questions, feel free to ask. I have been using this since Leopard's launch and have had zero problems with it
( Last edited by vwgtiturbo; Jan 16, 2009 at 03:32 AM. )
Black 13" Widescreen MacBook
2.0Ghz C2D, 2GB RAM, 320GB HDD
Mac OS X v10.6 Snow Leopard
     
philm  (op)
Mac Elite
Join Date: May 2001
Location: Manchester, UK
Status: Offline
Reply With Quote
Jan 16, 2009, 05:44 AM
 
Great stuff. Thanks for your detailed reply.
     
vwgtiturbo
Forum Regular
Join Date: Feb 2007
Status: Offline
Reply With Quote
Jan 16, 2009, 12:42 PM
 
No problem, that's what we're here for!
Black 13" Widescreen MacBook
2.0Ghz C2D, 2GB RAM, 320GB HDD
Mac OS X v10.6 Snow Leopard
     
Eagle_in_oz
Fresh-Faced Recruit
Join Date: Sep 2009
Status: Offline
Reply With Quote
Sep 13, 2009, 11:08 PM
 
I realize this thread is old but I recently purchased an intel based MBA and was trying to set this up as well. after hunting all over the internet I kept coming up with this same fix i.e. using a script to switch between drives.

I found a way on my own to make it work seamlessly between work and home with no need to run scripts or change the drive. Keep in mind my way cost me a bit for the equipment but it works awesome.

I basically setup a 500GB Time Capsule at work and bought an Airport Extreme Base Station which I attached an external Hard drive to and set up at home. The trick was as simple as this:

I setup the following exactly the same on both my work and my home base station.
Time Capsule / Airport Name: Same on both
Time Capsule / Airport Password: Same on both
Wireless Network Name: Same on both
Wireless Network Security: Same on both
Wireless Password: Same on both
Hard Drive Name: Same on both
File Sharing: With Time Capsule/Airport password on both

With everything the same my MBA seemlessly connects to the wireless access point of either Base Station with no switching required. And since the path to my disk and the disk itself is the same name on both ends it also finds my hard drive on either end automatically and begins its time machine sync with no issues.

As an afterthought I imagine you could setup one Airport Extreme and then save the configuration and import it to the other one. you would obviously need to then manually change your internet settings on the second device to work for its location but the rest of the settings would be the same.

Anyway I am posting this in the hope it may help some others out there who have been beating their heads against the wall with this. I realise my way is a bit of an expense as it requires the use of two Airport Extremes or one Airport Extreme and one Time Capsule (which is really just an Airport Extreme with an internal Drive) but it worked a treat for me and I am super happy that I just can open my MBA on either end and it all just works.
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 06:33 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,