Looking at backing up some of our Jamf configs... is there a way (using the api, perhaps?) to do a dump of ALL scripts used in Jamf?
I probably have close to 100 scripts, but they are all stored in the DB. Any way to dump those out, even if just to a single large text file?
Easiest way to get a local copy is to create a folder anywhere on your Mac, then open up Jamf Admin, then drag that folder to jamf admin as a DP and hit replicate. It will sync all scripts and packages to a local folder structure on your Mac. This is way faster than using the API. If you are looking to get everything into other systems and do integration the API would be better
However, you should be putting your scripts into something like GitHub anyway
Der Flounder has a great solution - https://derflounder.wordpress.com/2018/12/08/backing-up-macos-scripts-from-jamf-pro/
I like the simplicity of @tlarkin 's reply, but with 200+ gb worth of packages after adding all of the latest Creative Cloud apps, I'll probably try der flounder's so I can get JUST the scripts for now.
Moving to a new role where I'll absolutely be looking to put them into git - massive red tape at current role has prevented us from using git for the past year or so, but I agree that's definitely the right type of approach.
https://github.com/boberito/jamfapi/blob/master/scriptdump.py I got a script for you!
Create a folder in /Users/Shared called JAMFScripts. It'll download and dump them all in there. Or edit that line to point where ever you want. Downloads them and names them as the name is in Jamf with .sh
It hates colons and slashes in the name, so if you have that you'll have to change the name of your script in the jamf server.