ctwise Posted February 21, 2013 Share Posted February 21, 2013 Simple workflow that shows Time Machine status and lets you start and stop a backup. Download from here - http://tedwi.se/u/dc bcometa 1 Link to comment
ctwise Posted February 23, 2013 Author Share Posted February 23, 2013 404 Hosted database was dead. It's working again now. Link to comment
vancura Posted February 24, 2013 Share Posted February 24, 2013 Hosted database was dead. It's working again now. Thanks! Link to comment
derico Posted April 6, 2013 Share Posted April 6, 2013 (edited) Hmm, it was working fine at first but seems to do nothing since I moved the backup to NAS: It hangs on checking status and when I choose to start/stop a backup, the notification appears immediately but nothing actually happens. Edit: Well, I thought it worked once, but the 'tmutil' command seems to be missing in Snow Leopard. Is there an alternative for 'tmutil'? 07.04.13 16:56:35 [0x0-0x2a02a].com.runningwithcrayons.Alfred-2[216] -e:38: command not found: tmutil status 07.04.13 16:56:35 [0x0-0x2a02a].com.runningwithcrayons.Alfred-2[216] -e:22: undefined method `start_with?' for nil:NilClass (NoMethodError) Edited April 10, 2013 by derico Link to comment
shadylane Posted April 20, 2013 Share Posted April 20, 2013 Hi Ted! Thank you very much for the workflow! I tried to cobble something similar together myself - but since I really know nothing about scripting I was glad to find your workflow I do have one question though: when I was working on my own workflow for Time Machine I tried to get a notification that shows me the time/date of the last completed backup. I even found a script that will do just that: date -jf "%Y-%m-%d-%H%M%S" "$(tmutil latestbackup | sed 's|.*/||')" +"%F %T" But for it to work the backup drives have to be mounted. Since I use two different drives for Time Machine and one of them is a Time Capsule, that script would always mount the drive first - not a perfect solution... so I kept searching and found this: http://goo.gl/oVCWK But I couldn't make it work. Would it be difficult to add that feature to your workflow? Or maybe you can give me some advice on how I could add it myself, that would be great All I really want is a notification with the time/date of the last backup, it doesn't have to be part of the script filter. Thanks and cheers, Anna Link to comment
ctwise Posted April 20, 2013 Author Share Posted April 20, 2013 (edited) Hi Ted! Thank you very much for the workflow! I tried to cobble something similar together myself - but since I really know nothing about scripting I was glad to find your workflow I do have one question though: when I was working on my own workflow for Time Machine I tried to get a notification that shows me the time/date of the last completed backup. I even found a script that will do just that: date -jf "%Y-%m-%d-%H%M%S" "$(tmutil latestbackup | sed 's|.*/||')" +"%F %T" But for it to work the backup drives have to be mounted. Since I use two different drives for Time Machine and one of them is a Time Capsule, that script would always mount the drive first - not a perfect solution... so I kept searching and found this: http://goo.gl/oVCWK But I couldn't make it work. Would it be difficult to add that feature to your workflow? Or maybe you can give me some advice on how I could add it myself, that would be great All I really want is a notification with the time/date of the last backup, it doesn't have to be part of the script filter. Thanks and cheers, Anna You can build a quick workflow yourself. Create the workflow, trigger it with a keyword of your choice, connect it to a Ruby script and paste this in the box: require 'date' puts DateTime.strptime((`defaults read /private/var/db/.TimeMachine.Results BACKUP_COMPLETED_DATE`.strip), "%Y-%m-%d %H:%M:%S %z").new_offset(DateTime.now.offset).strftime("%A %B %d, %Y %l:%M %P") And connect the script to a display large type output. Edited April 20, 2013 by ctwise Link to comment
shadylane Posted April 20, 2013 Share Posted April 20, 2013 Hi Ted, thank you so much for your fast response, I really appreciate it! I feel like an idiot, but I don't get any output from the Ruby script... I have connected the keyword trigger to a "run script" module (/usr/bin/ruby) and added a "large type" module at the end - but nothing happens when I type the keyword. I don't get an error in Console app either. I have never had anything to do with Ruby, but Terminal tells me I have version 1.8.7 (thanks, Google!) and I'm on a recent Mac with 10.8.3. - is there anything else I need to install? Thanks again for your help Link to comment
ctwise Posted April 20, 2013 Author Share Posted April 20, 2013 Hi Ted, thank you so much for your fast response, I really appreciate it! I feel like an idiot, but I don't get any output from the Ruby script... I have connected the keyword trigger to a "run script" module (/usr/bin/ruby) and added a "large type" module at the end - but nothing happens when I type the keyword. I don't get an error in Console app either. I have never had anything to do with Ruby, but Terminal tells me I have version 1.8.7 (thanks, Google!) and I'm on a recent Mac with 10.8.3. - is there anything else I need to install? Thanks again for your help I edited my reply since I forgot the require statement. Try the updated code. shadylane 1 Link to comment
shadylane Posted April 20, 2013 Share Posted April 20, 2013 Ted, you are AWESOME! Exactly what I wanted, thank you so much. Link to comment
neilf Posted January 29, 2015 Share Posted January 29, 2015 Hi, Nice workflow. I'm new to all of this...is there a way to get the Time Machine controller to work in the Alfred remote? Thanks, neilf Link to comment
ctwise Posted January 29, 2015 Author Share Posted January 29, 2015 Hi, Nice workflow. I'm new to all of this...is there a way to get the Time Machine controller to work in the Alfred remote? Thanks, neilf I just updated the workflow on Packal to add remote triggers. Link to comment
Weaselboy Posted January 15, 2016 Share Posted January 15, 2016 Just installed your workflow on El Capitan 10.11.2 and it works perfectly. Exactly what I was looking for! Thank you Link to comment
rdg Posted June 7, 2019 Share Posted June 7, 2019 I tried this out on Mojave, and the status fails over to a google search. With some investigation, I found that the method for getting the latest backups is obsolete. Digging around online, I found a way to query backup information even when the backup discs are unavailable: /usr/libexec/PlistBuddy -c "Print Destinations" /Library/Preferences/com.apple.TimeMachine.plist This gives you every TM volume's list of backups, which should be parseable to make it pretty, and to possibly only grab the BackupAlias and last "SnapshotArray" date. I haven't had time to modify your script to make that work, but thought I'd share what I found in case you're still updating the workflow. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now