Ability to run Anacron as a user
Scott Haneda
talklists at newgeo.com
Wed Jun 3 13:18:36 PDT 2009
On Jun 3, 2009, at 11:04 AM, macports at festus.festusandsimone.org wrote:
> On Tue, 02 Jun 2009 13:47 -0700, "Scott Haneda" <talklists at newgeo.com>
> wrote:
>>
>> Perhaps you may want to ditch anacron, and look into launchd? Lingon
>> can be used, I believe, in the same way to shied you from the
>> intricacies of OS X scheduling.
>
> Thanks Scott! Being a fairly recent Mac user (moving from Gentoo),
> this looks like it will work out just perfectly. Consider anacron to
> be
> off this machine soon.
I did not mean to bash anacron, I am sure it is great software. For
your needs, launchd should give you more granular control.
>> If you are able to run interactively your rsync script, which I
>> assume
>> asks you for a password to login, then anacron, or launchd are both
>> going to need keys on the server no matter what.
>>
>> Somewhere, you have to have the keys to do a passwordless login. If
>> your machine is compromised, you can always revoke the keys quickly.
>> Reading a little about anacron, I can not see there being anything
>> launchd can not do, and much more.
>
> Yeah, passwordless login is working just fine. That wasn't the
> issue. It
> was
> just getting the script scheduled to run under user credentials.
Launchd supports setting users and groups, also supports logging to a
specific file, as well as setting a working directory so you do not
have to fight with really long paths and paths with spaces in them
within the file.
One think about Lingon, which I reco'd to you, is it will in fact
escape the spaces in a file path, which my experience, and those on
the launchd mailing list, state to not do.
>> Curious also, make sure you use rsync correctly, if you are syncing
>> mac files, there are special flags you need to add in order to not
>> nuke your Mac OS X resource/data forks, thereby breaking your files
>> and having an incomplete backup.
>
> I don't have my rsync command line in front of me right now (at work),
> but I've
> pulled and consolidated a bunch of rsync scripts for Mac users from
> the
> web. Do
> you have any special flags that you recommend, and I'll compare them
> with
> what I have tonight.
Yes, I think the single most important flag is:
-E, --extended-attributes copy extended attributes,
resource forks
This is very easy to test. I am not sure what software you use, so I
will list a few. Interarchy bookmarks, those will break if you lose
the extended attributes, Quark files, not that I use them, but I have
broken them. Ahh, what the heck, a .webloc is a forked file. Drag a
url out of safari onto your desktop, it will make a .webloc file. Run
your rsync, and see if that .webloc can open the url again, if it can,
chances are pretty good you are doing the right thing.
Grab a few random files and do:
md5 /path to original
md5 /path to copy
If those md5's match up, you also know you are doing pretty good.
Hope that was of some help, good luck with your scripts.
--
Scott * If you contact me off list replace talklists@ with scott@ *
More information about the macports-users
mailing list