@mpermann @dpertschi
That is one of the recommended ways, yes.
Incremental upgrades typically aren't necessary unless we're coming from a version of 8 that is older than 8.7, but if you're more comfortable doing incremental upgrades, it shouldn't cause any issues.
You can also install 9.65 fresh and restore an 8.73 database, as long as you don't open the 9.65 webapp prior to the restore.
If you initialize the 9.65 JSS first by going to your JSS' URL, it creates all of the tables necessary for a new database during that process, and when you try to restore an 8.x database over that, it will create schema errors.
This happens because it sees that there is an 8.x database and attempts to upgrade it, and when it hits tables that already exist it will fail with that error.
Just as an example: In 8.x the table for mobile devices is called iphones, in 9.x it's mobile_devices.
If you restore an 8.x database over a 9.x database, it doesn't overwrite the mobile_devices table because that table didn't actually exist in 8.x, but it does put the iphones table in there.
The next time you open the webapp, it detects that there is an 8.x database and tries to rename and convert that iphones table to the two new 9.x tables; that table already exists in this scenario, and it cannot do that, so we get an error in the logs stating the mobile_devices table already exists and the upgrade fails with a Database Schema Error.
There are a couple dozen tables this can happen on, and is the primary reason we don't want to restore an 8.x database over a 9.x install that has already had the webapp started.
In this particular case, it can be cleared up by doing the following:
- Make sure you have a good database backup first. If you're not 100% sure you have a good backup from before the failed upgrade, do not proceed and call your Technical Account Manager.
- Log in to MySQL as the root user.
- Check again to make sure you still have a good backup from before the failed upgrade; this really is important as the next step will get rid of the entire existing jamfsoftware database. Once it's gone, it's gone.
- Run the following command: drop database jamfsoftware;
- Run the following command: create database jamfsoftware;
- Do not go to your JSS URL. Doing so will set up the table structure for a 9.65 database, and we don't want that to happen yet.
- Restore your 8.73 database.
- Once the restore is finished, go to your JSS URL and it should go through the upgrade without schema errors.
If it fails again, or if you're not comfortable with/are unsure about any of the steps above, please grab a copy of your JAMFSoftwareServer.log and get in touch with your Technical Account Manager either by giving them a call, by sending an e-mail to support@jamfsoftware.com, or by using the My Support section of JAMF Nation.
Thanks!
Amanda Wulff
JAMF Software Support