Ashler wrote:
The test script works fine as all it is doing is echoing to a log as a test.
There's nothing wrong with that. There are a lot of pieces to assemble to get that running. This is an important first step.
The real script works from a scheduling/launchd/plist perspective.. but however it is running, the script's rsync lines cannot access my user Documents and Pictures etc. directories
Ah! The truth comes out. This is one of those cases where an initial "what are you trying to do?" query would have been useful. But we've been well-trained to avoid that question to limit the OP apoplectic rage factor. But it's always been a great question.
The script works perfectly fine if I manually run it. I mean come on, all I want to do is automate this to rsync every hour. Should not be this difficult.
Do you want to know why it's that difficult? It's fascinating really. I'm sure you don't. 😄
Very frustrating. This is my computer, my files, my network, etc.
Your computer? You files? Your network? Wow! And when you run commands, they work perfectly. But when some random, unsigned script running in a background context attempts to siphon off all of your files it doesn't work? Remind me again if this is a good thing or a bad thing.
If Apple is going to prohibit basic scripting, at least produce errors and documentation on what exactly is the prohibition. A perfectly well working script cannot be scheduled by the administrator of the system?
Are you equating "basic scripting" to "scheduled execution of rsync"? I've only been working with Unix-based system for less than 40 years, so still learning. But I avoid rsync. What a nasty piece of work that is.
So secure it is not useable?
As you've repeatedly stated, it works fine and is perfectly usable. You're just unable to schedule it to run unattended.
I was hoping to use the Apple OS ecosystem/standards (in a sense) but nope. I guess I have to explore cron on macOS or something else.
There's a song that has a line like "two steps forward, one step back" 🎶
(Am I the only one who notices the incredible lack of musical notes in Unicode?)
As MrHoffman correctly stated, cron is an excellent choice for many automation tasks. It's much easier than plist config files. But you didn't ask about cron or about scheduling rsync to backup your privacy-sensitive files. You asked about launch agents, so we answered questions about launch agents.
And all this is due to I have significant investment in perfectly good, but older, network appliances that are unfortunately dependent on AFP for TimeMachine backups. So Apple kills AFP, but provides no workaround. In fact, my TimeMachines are literarily useless now. $ --> trash.
Cue the rant incoming...
Yes, it's awful that Apple discontinued AFP with absolutely no networking protocol replacement. Steve Jobs never would have done that. Dear Apple, we didn't buy new devices, and constantly keep them updated, just so you could break compatibility to all of our other devices we purchased and last updated in 2002!
Vendors of older appliances certainly are not going to help either.
Yeah! It's almost like all anybody wants to do anymore is sell new products. Sell, sell, sell! That's all they want!
D**n Capitalists!
So fine, rsync via ssh to the older NAS'.... only Apple is making that very difficult. Again, scripts work. Automation routes seem unsupported.
Totally unsupported. Nobody does automation anymore. They're too busy.
Yeah. So this is really awkward. This is a classic case of someone digging themselves into a rabbit hole, and then posting a question asking for advice regarding more efficient shovels. The answer isn't a new shovel, it's a ladder.
There are far better ways to backup your data. I'm sorry if your old NAS devices are discontinued, unsupported, and haven't been updated in years. I've been around these parts long enough to remember the day when Apple discontinued AFP. Every NAS in the world broke that day. After about 3 minutes of digging, I discovered that Apple had publicly deprecated a key, but obsolete, AFP security protocol 9 years earlier.
So what did everyone do? Did they update their systems to switch to SMB? No! Of course not! They exchanged notes and figured out how to re-enable the deprecated AFP! Whew! Dodged a bullet on that one! And then, next year, Apple actually removed support for the insecure protocol and everything broke again.
Since then, I've seen this pattern repeated multiple times. Apple's been pretty consistent in discontinuing outdated technologies 10 years after they become obsolete or unsafe. And boy do people hate that! They hate it so much they stopped buying Apple devices entirely and threw them all in the trash, just like you. Oh wait...nobody did that, did they? Hmmm....