Can I Do a Time Machine (TM) Restore Using AppleScript?

Can I Do a Time Machine ™ Restore Using AppleScript?
I’ve done numerous Google searches, and several forum searches, and have found nothing on this topic.

Is it possible, via AppleScript, to execute a Time Machine restore:
¢ Given a full path to the file/folder
¢ Given a “as of” date
¢ Given a restore to location

If so, please point me to documentation and/or sample code.

If it can’t be done via AppleScript, can it be done via any other language?

TIA for your help and ideas. I’m open to any solution to this problem.

Hi,

You can do that with the command line interface tmutil

Thanks StefanK. tmutil would appear to provide what I need.
However, I can’t understand the syntax.

I don’t know, I’m just guessing, that the “src” parameter would look something like the “snapshot volume” path above.
So is my “as of” date simply embedded in the path?
Also, any idea what the “-v” switch does?

If anyone can provide some real examples of using the "restore’ command, I would greatly appreciate it.

TIA.

-v is the verbose flag to get log messages in the console.

To use tmutil this might be starting point: https://support.apple.com/en-us/HT202406