jamf / JamfMigrator

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

Jamf Migrator

GitHub release (latest by date) GitHub all releases GitHub all releases GitHub issues GitHub closed issues GitHub pull requests GitHub closed pull requests

Download the current release: Jamf Migrator

A tool to migrate data granularly between Jamf Pro servers

alt text

Migrate items from one Jamf server, or XML file(s), to another. If an item (based on name) within a category exists on both source and destination, the destination item will be updated with values from the source server.

Username and password fields can be hidden/shown using the disclosure tringle on the left.

alt text

When migrating files be sure to open the 'raw' folder. alt text

Devices (computers and iOS), Groups, Policies, and Configuration Profiles can be targeted to a particular site.
alt text

Servers can be removed from the (source/destination) list by holding down the option key while selecting the server. A warning will be presented to verify the removal.
alt text

Limitations/requirements to be aware of:


The Selective tab provides the ability to select a subset of (or all) items within a collection of objects. For example you might only want to transfer 4 scripts from a larger pool of existing scripts. alt text

Also, policies may have their dependencies checked/migrated using the Migrate Dependencies button. Only 'top-level' dependencies are checked. i.e. if the scope is being migrated and contains nested computer groups or groups assigned to a site that doesn't exist on the destination server the policy migration will likely fail. alt text Note: The ID of any object can be seen my hovering the mouse over the object.

Files exported using jamf-migrator can be imported into another Jamf Pro server. Be sure to open the 'raw' folder when importing.

alt text

Important: Trimmed XML files cannot be used as they are missing data required for the migration.

Preferences:

In addition to scoping options the following are available:

object name is used to determine whether or not it is on the destination server



Options to export XML from the source server are also available.



Options for migrating object(s) (groups, policies, and configuration profiles) to a particular site can be set.



The number of concurrent API operations (from 1 to 5), sticky sessions (when available), forcing basic authentication, color scheme, number of log files to retain, and number of servers can be remembered.



Migrated computers can show as managed by setting the management account.



Set a password for following migrated service accounts; bind, ldap, file share Read/Write, and file share Read-only.

Note, the same password will be applied if you have multiple binds, or ldap servers, or file shares coonfigured.


Migration Summary:

Information about successes/failures can be found in the log, located in

~/Library/Containers/com.jamf.jamf-migrator/Data/Library/Logs/jamf-migrator/<date>_<time>_migration.log

If you have used jamf-migrator and saved passwords you will see the following after launching a new version.

alt text

If you'd like the new version to access existing credentials select the desired option.

Important:

Note: the app can also be used to clear out a Jamf server. Typing the following after launching the app will set it into removal mode. Items from the destination server are deleted once Go is clicked.

touch ~/Library/Containers/com.jamf.jamf-migrator/Data/Library/Application\ Support/jamf-migrator/delete

Running from the command line

Help is available by running:

/path/to/jamf-migrator.app/Contents/MacOS/jamf-migrator -help

Running the following in Terminal will export all objects (full XML) that can be migrated:

/path/to/jamf-migrator.app/Contents/MacOS/jamf-migrator -source your.jamfPro.fqdn -export -objects allobjects

In the event you have multiple entries in the keychain for a server you'll need to specify which username to use. For example:

/path/to/jamf-migrator.app/Contents/MacOS/jamf-migrator  -source dev.jamfcloud.com -destination prod.jamfcloud.com -objects "categories,buildings" -migrate -sourceUser devadmin -destUser prodadmin

Before running an export via command line at least one export from the app must be manually run saving the source username and password or client ID and secret.

To migrate object(s) using the command line, something like the following can be used:

/path/to/jamf-migrator.app/Contents/MacOS/jamf-migrator -source your.jamfPro.fqdn -destination dest.jamfPro.fqdn -objects categories,buildings -migrate

If importing files, the import folder must be selected in the UI before the command line can be successfully run.

To set an ldap id of 3 on jamf user accounts and force that id (also converts local accounts to ldap) use the following:

/path/to/jamf-migrator.app/Contents/MacOS/jamf-migrator -ldapid 3 -source /Users/admin/Desktop/export/raw -migrate -objects jamfusers

This can also be accomplished using the UI by launching jamf-migrator from Terminal:

/path/to/jamf-migrator.app/Contents/MacOS/jamf-migrator -ldapid 3



History

v7.4.2
Resolve authentication impacting command line usage (issue #100) and initial token generation (issue #101).

v7.4.1
Resolve issue with token renewal. Resolve issue when running from the command line. Resolve issue removing policies. Resolve issue migrating self service icons.

v7.4.0
Resolve scrolling issue with selective migrations. Better handling of computers/mobile devices with duplicate names. Minor layout changes. Ability to sort ascending or descending object list in selective migration.

v7.3.1
Work to resolve issue (#91), logging in with API clients. Add option to copy only items not on the destination server - create only. Add option to copy only items currently on both source and destination servers - update only. Add option to set the number of servers/folders saved.

v7.2.2
Fix version lookup with Jamf Pro 11, background threading issue.

v7.2.1
Fix issue logging into Jamf Pro 11, issue #91. Update token refresh method.

v7.2.0
Add support for API client in both the UI and command line.

v7.1.1
Prevent configuration profiles that include a Filevault payload from migrating. Fix export of smart comuter/device groups. Fix color mismatch (issue #88)

v7.1.0
Command line functionality. Note, -backup has been renamed -export and allows for specific types of objects to be exported. Exported scripts no longer have characters XML encoded. Expire tokens when quitting app.

v7.0.2
Make disclosure triangle more visible in light mode with default color scheme Fix counter when deleting items better handling of access to previously selected folders better handling of preferences as they are changed

v7.0.1
prevent sleep while migrating fix token refresh

v7.0.0
Redesigned UI. Add ability to show/hide username and password fields. Migrate locally created classes and delete any class. Add ability to force basic authentication.

v6.3.0
Add ability to utilize selective migration while using exported files as the source. Fix crash (issue #80) when Site is selected. Show text while icons are being uploaded for self service policies and iOS apps. Fix issue with selective migration of policies.

v6.2.7
Fix crash when running on a machine for the first time (#79). Invalidate tokens when switching servers and stop token refresh once migration competes. Better user experience when working with export options and the disable export only button.

v6.2.6
Fix issues #77 (self service display name) and #78 (crash when checking for updates)

v6.2.5
Better handling of package filename/display name lookups.

v6.2.4

v6.2.2

v6.2.1

v6.2.0

v6.0.1

v5.9.3

v5.9.2

v5.9.1

v5.9.0

v5.8.3

v5.8.2

v5.8.0

v5.7.0

v5.6.2

v5.6.0

v5.4.0

v5.3.2

v5.3.1

v5.2.9

v5.2.8

v5.2.7

v5.2.5

v5.2.3

v5.2.2

v5.2.1

v5.2.0

v5.1.0

v5.0.3

v5.0.1

v5.0.0

v4.1.3

v4.1.2

v4.1.0

v4.0.0

v3.3.5

v3.3.4

v3.3.3

v3.3.2

v3.3.0

v3.2.2

v3.2.0

v3.1.0

v3.0.6

v3.0.5

v3.0.0

v2.8.0

v2.7.2

v2.6.3

v2.6.2

v2.6.0

v2.2.5

v2.1.5

v2.1.4

v2.1.3

v2.1.0

v2.0.0

v1.2.1

v1.2.0

…/jamf-migrator.app/Contents/MacOS/jamf-migrator –debug