jamf / JamfMigrator

A tool to migrate data granularly between Jamf Pro servers
MIT License
136 stars 10 forks source link

Command Line use #84

Closed grahampugh closed 1 year ago

grahampugh commented 1 year ago

Hi, I realise this might be a big task, but it would be amazing if Jamf Migrator could be used at the command line. I note that there is a single command line option already. The use case is to automate the export of all the XML from multiple Jamf Pro servers on a regular basis for backup and analysis purposes.

I do have an internal command line tool to do this already, but it's somewhat hacky and requires an update for bearer token use, so I thought I would see if this is on your roadmap already.

BIG-RAT commented 1 year ago

Yes, that is in the making. Just started with the export after hearing 'Someone deleted xxxx, is there any way to restore it without restoring the whole database?' once too often. Not a 100% solution but hopefully worth the effort. I'm looking to add something like: .../jamf-migrator.app/Contents/MacOS/jamf-migrator -migrate -source source.jamfserver.com -dest dest.jamfserver.com -objects policies,packages,scripts and/or .../jamf-migrator.app/Contents/MacOS/jamf-migrator -migrate -settings /path/to/some.plist

grahampugh commented 1 year ago

That sounds awesome! May I ask for the ability for an option for the source to be a local folder as in the GUI? Use case is for creating a wrapper script for uploading to multiple destinations.

BIG-RAT commented 1 year ago

It's on the list. Was also considering allowing multiple destination servers in the command line/plist.