Firing TimeMachine from LaunchBar

Sharing and discussing custom actions for LaunchBar
Post Reply
Posts: 18
Joined: Tue Aug 19, 2014 10:47 pm

Firing TimeMachine from LaunchBar

Post by comety » Thu Jan 01, 2015 3:08 am

Which LaunchBar version are you running?

Which OS X Version are you running?

Your message:
Hey! Remember me, the guy who could not get the themes to load and it broke all sorts of stuff to the point I even had to uninstall it? Finally I figured it out. I had to literally break the system down to nothing, install LB, test, install something new, test, and figure out where it broke. Finally, as a result of me not using so I zip it up because I don't want it auto launching on a mailto link. Then everything worked fine. There is either code dependency in LB code that needs to exist, which makes sense as I know there are a few LB shortcuts for

I wanted to post the above to get it into google and the forums in case it would help others.

Anyway, new issue:
I have a file "Backup Time Machine Now"

All that is in it:
cat "Backup Time Machine Now"
/usr/bin/tmutil startbackup

The trouble is, which I don't get because it worked pre version 6 with no issues. However, we all know that time machine needs admin privs to backup many of the files it needs to backup. True app sandboxing is not there yet.

How do I do something like make the above an applescript that has the privileges added in:
do shell script "/usr/bin/tmutil startbackup" with administrator privileges
That works perfect, though it pops up a dialog box that asks for my password, just like any text editing app does when you try to write to a file you don't have permissions.
Suggestions? Can I set the seated bit to solve this?

I use TimeMachine like git, and "push" to it all the time. command-space-T-M is like my alias that does a "git push origin master". I do it frequently so I can roll back as needed.

I am going to read `man tmutil` and see if there are any hints. I don't even mind hard coinng the Time Machine Password into the script, unless someone can tel me why that would be a bad idea.

According to the man page:
"Several, but not all, verbs require root privileges."

Intersting, I may have been making bad backups this entire time. I usually only restore files from ~/ and ignore all the rest, and rebuild my system, so I guess as a resultt, my messed up script didn't hurt much. But I will want to use it with Arq for off site backup, where they put the admin prig's feature in the preferences. Couldn't LB get a preference, run the following scripts with admin privileges, and there is a file chooser and a box that hods a nice list of files.

Post Reply