Skip to main content
Jamf Nation, hosted by Jamf, is a knowledgeable community of Apple-focused admins and Jamf users. Join us in person at the ninth annual Jamf Nation User Conference (JNUC) this November for three days of learning, laughter and IT love.

Reverting to a Previous Version of Jamf Pro after a Failed Upgrade

Overview

This article explains how to revert to a previous version of Jamf Pro after a failed upgrade.

Note: The instructions in this article should only be used for a failed upgrade. If you revert a Jamf Pro installation that has been in production to a previous version of Jamf Pro, you will lose all management tasks, such as policies, in your environment.

Versions Affected

Jamf Pro 9.0 or later

Procedures

macOS

  1. Ensure your database is backed up. See Backing Up the Database in the Jamf Pro Installation and Configuration Guide for Mac for complete instructions.
  2. On the Jamf Pro host server, stop Tomcat. See Starting and Stopping Tomcat for complete instructions.
  3. Open Terminal.
  4. If you have set the value of the PATH environment to include the MySQL directory, access the MySQL command line as "root" by executing the following command:
    mysql -u root -p
    If you have not set the value of the PATH environment to include the MySQL directory, access the MySQL command line as "root" by executing a command similar to the following:
    <path-to-mysql>/mysql -u root -p
    Note: Replace <path-to-mysql> above with the path to MySQL. The default path for MySQL is /usr/local/mysql/bin/. You may need to use a custom path if it is installed in a different location.
  5. When prompted, enter the password for the MySQL "root" user.
  6. Drop the database by executing the following command:
    drop database jamfsoftware;
  7. Create a database by executing the following command:
    create database jamfsoftware;
  8. Exit MySQL by executing the following command:
    exit
  9. Back up the Jamf Pro folder, located at /Library/JSS/, by copying it to a secure location.
  10. Download a previous version of Jamf Pro from Jamf Nation, and then run the Jamf Pro Installer for Mac to install a previous version of Jamf Pro.
  11. Restore your database backup. See Restoring Database Backups in the Jamf Pro Installation and Configuration Guide for Mac for complete instructions.

Linux

  1. Ensure your database is backed up. See Backing Up the Database in the Jamf Pro Installation and Configuration Guide for Linux for complete instructions.
  2. On the Jamf Pro host server, stop Tomcat. See Starting and Stopping Tomcat for complete instructions.
  3. Open a command prompt.
  4. If you have set the value of the PATH environment to include the MySQL directory, access the MySQL command line as "root" by executing the following command:
    mysql -u root -p
    If you have not set the value of the PATH environment to include the MySQL directory, access the MySQL command line as "root" by executing a command similar to the following:
    <path-to-mysql>/mysql -u root -p
    Note: Replace <path-to-mysql> above with the path to MySQL. The default path for MySQL is usually /usr/bin/mysql. You may need to use a custom path if it is installed in a different location.
  5. When prompted, enter the password for the MySQL "root" user.
  6. Drop the database by executing the following command:
    drop database jamfsoftware;
  7. Create a database by executing the following command:
    create database jamfsoftware;
  8. Exit MySQL by executing the following command:
    exit
  9. Open a command prompt and execute the following command to back up your JSS folder:
    sudo mv /usr/local/jss/desired/path/for/backup
  10. Download a previous version of the Jamf Pro Installer for Linux from Jamf Nation and install a previous version of Jamf Pro.
  11. Restore your database backup. See Restoring Database Backups in the Jamf Pro Installation and Configuration Guide for Linux for complete instructions.

Windows

  1. Ensure your database is backed up. See Backing Up the Database in the Jamf Pro Installation and Configuration Guide for Windows for complete instructions.
  2. On the Jamf Pro host server, stop Tomcat. See Starting and Stopping Tomcat for complete instructions.
  3. Uninstall Jamf Pro:
    1. Navigate to the Control Panel, and then click Uninstall a Program under the Programs heading.
    2. Select "Jamf Pro" from the list of installed programs, and then click Uninstall.
    3. Click Yes when prompted.
    4. Open the MySQL Command Line Client.
    5. When prompted, enter the password for the MySQL "root" user.
    6. Drop the database by executing the following command:
      drop database jamfsoftware;
    7. Create a database by executing the following command:
      create database jamfsoftware;
    8. Exit MySQL by executing the following command:
      exit
    9. Back up the Jamf Pro folder, located at C:\Program Files\JSS\, by copying it to a secure location.
    10. Download a previous version of the Jamf Pro Installer for Windows from Jamf Nation and install a previous version of Jamf Pro.
    11. Restore your database backup. See Restoring Database Backups in the Jamf Pro Installation and Configuration Guide for Windows for complete instructions.
Like Comment
Order by:
SOLVED Posted: by donmontalvo

Snapping the RAID1 mirror works too. :)

Like
SOLVED Posted: by rcorbin

I think a step is missing. I think you need to grant all access to the database user.

Like
SOLVED Posted: by lashomb

Do client binaries and Self Service apps get downgraded as well during checkins after the rollback?

Like
SOLVED Posted: by donmontalvo

We found that backing up the /usr/local/jss folder is the quickest way to get back to the previous version (of course you'll need to follow the KB for the database side)...this script logs the UID in case it is needed too.

#!/bin/sh
#
# For Tomcat Prod servers.
#
# This script will back up /usr/local/jss folder to /Support folder, and will add
# hostname, UID (for jamftomcat), and date, to the archive name.
#
# IMPORTANT: must be run as root, to preserve owner:group and permissions.
#
# Example of the output format:
#
#   jss-hostname-YYYYMonthDD-HHhMMmSSs-TZ-UIDXXX-Version-major.minor.patch.tar.gz
#
# 20180717 DM

theHostname=$( echo $HOSTNAME )
theDate=$( date +%Y%B%d-%Hh%Mm%Ss )
theTimezone=$( date | awk '{ print $5}')
theUid=$( id -u jamftomcat )
theVersion=$( sed '9q;d' /usr/local/jss/tomcat/webapps/ROOT/WEB-INF/xml/version.xml | cut -d ">" -f2 | cut -d "-" -f1 )

sudo tar -C /usr/local -czvpf /Support/jss-"$theHostname"-"$theDate"-"$theTimezone"-UID"$theUid"-Version-"$theVersion".tar.gz jss

exit 0

@lashomb interesting question, curious if Jamf ever answered the question? We stage all upgrades from DEV>QA>PROD so far haven't had to worry about that.

Like