jamf / JamfMigrator

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

Loss of all package entries on current database after migrating 'file share' #27

Closed monodata closed 5 years ago

monodata commented 5 years ago

I am migrating my current instance to a new one using the tool and after I migrated the 'file share' I noticed that all the packages has disappeared from the current instance.

All the packages still physically exist but were removed from the database so that a query to the API return the following:

<packages>
  <size>0</size>
</packages>

Once I opened Jamf Admin, it started to repopulate (on the bottom of the splash screen it said "creating xxx package") and now they are all back but every other entry is "No category assigned" which is weirdly amusing! (see attached image)

[edit: just noticed that its actually duplicated all the entries which makes it easier to remove them]

Screenshot 2019-04-16 at 10 41 29

This is good in one way as I inherited this system and it needs a huge purge!

Let me know what log files you might need and I can post them as gists.

BIG-RAT commented 5 years ago

Did you migrate packages along with the file share? Migrating the file share alone tells the current (destination) server what share to use but not what packages are there. Logs are found in ~/Library/Logs/jamf-migrator.

monodata commented 5 years ago

I migrated the file share first without the packages as Ive been going through selective choosing which policies/groups/packages to migrate.

Just so we're clear, the packages disappeared from my current instance, not the one Im migrating to.... Weird, I know especially as the migrator is only reading so its possibly indicative of a deeper issue with my JSS Im migrating from (its old and is long overdue a decomm!)

Migrator Log: https://gist.github.com/monodata/0595ceb639ce4b692ef05f9a61606db9

Im going to have a dig through the JSS logs to see what happened there.

BIG-RAT commented 5 years ago

Very odd. Unless the app is running in Removal mode nothing should vanish. As you mentioned the app is simply doing a GET to retrieve a list of shares. Don't see anything odd in the log. I'll poke around a bit more to see if anything comes up.

monodata commented 5 years ago

The log for migrating the distribution point was at 130611:

20190415_130611 ----------- Starting Migration -----------
20190415_130611 [CreateEndpoints] Migrating distributionpoints
20190415_130611 [CreateEndpoints] [distributionpoints] succeeded: EU08PSCCMDP01/Casper

Theres a removal mode????!!

How do I check that?

BIG-RAT commented 5 years ago

Hit command+d. It's detailed in Help along with some other stuff.

monodata commented 5 years ago

Considering that the tool was in GET / Read-Only mode, I think we can safely assume that the weirdness has come in from somewhere else, and so I'll close this off as resolved / Not the cause of the issue.

Thanks for the quick response and pointers!