Export all scripts?

Valued Contributor

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?


Honored Contributor

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

Valued Contributor II

Der Flounder has a great solution - https://derflounder.wordpress.com/2018/12/08/backing-up-macos-scripts-from-jamf-pro/

Looking for a Jamf Managed Service Provider? Look no further than Rocketman

Virtual MacAdmins Monthly Meetup - First Friday, Every Month

New Contributor III

+1 for @Hugonaut ‘s answer. Rich’s script is amazing and has helped me out a lot

"Saying 'uhh..' is the human equivalent to buffering."

Valued Contributor

Thanks all.

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.

Valued Contributor


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.

Valued Contributor

PS. Done, and beautiful. Exactly what I wanted- just wanted to make sure I had a documented backup of every script. 88 scripts downloaded in about 30 seconds, beautiful :)

Valued Contributor

@boberito ... saw yours after I tried Der Flounder's, but much appreciated! I'll test it as well.

Contributor II
Contributor II

shameless self promotion, I like using jamf-migrator: https://github.com/jamf/JamfMigrator

Valued Contributor

Ahhh... didn't even thing of JamfMigrator, and I've used it before!

Thanks as well... this thread absolutely bolsters my personal toolbox.

Contributor III

However, this is still a Jamf bug in 2021, the "feature" still only exports 100 of the script names. And this is just the names of them, not the entire script (which is what I am looking for since we can't copy/paste the screen).

Esteemed Contributor II

@swhps Have you tried https://github.com/jamf/JamfMigrator which was mentioned above? It most definitely will allow you to export every script in your JSS.