If an Artifactory upgrade fails in a production environment and JFrog Support is unable to assist you in restoring the upgrade, a rollback may be necessary. An Artifactory upgrade makes permanent, non-reversible changes to its linked database. Accordingly, should rolling back an Artifactory upgrade be necessary, you'll need to reinstall an older version of Artifactory and load a database backup.
Please note this article assumes that you took a backup of Artifactory. Before upgrading to a new version of Artifactory, you should have performed a system export or taken a database dump of your external database. Should your upgrade fail, you're going to need this backup to recover. Backups are described in more detail HERE.
1] Shut down your Artifactory service:
systemctl stop artifactory
2] Search for the Artifactory installation and remove it:
[RPM install] rpm -qa | grep artifactory rpm -e <Artifactory-version>
3] Remove your Artifactory directories:
#NOTE: This only needs to be done if you have to reinstall Artifactory on the same machine! #Skip this step if you have a new host for the older Artifactory installation rm -rf /var/opt/jfrog/artifactory rm -rf /etc/opt/jfrog/artifactory
4] Download and install your old Artifactory version:
wget <Artifactory_download_link> rpm -i <ART>.rpm
5] Start your Artifactory service and check to see what comes online:
Systemctl start artifactory Tail -f /var/opt/jfrog/artifactory/logs/artifactory.log #You should see the following ASCII text: ### Artifactory successfully started (<seconds> seconds) ###
6] Add your license back to Artifactory in the web UI.
7] Restore the following files from your backed up etc directory:
$ART_ETC/default $ART_ETC/binarystore.xml8] You'll need a new empty database to restore to. Then, configure your new $ART_HOME/etc/db.properties file and connect to it.
9] Restore your Artifactory data to the same location it was before.
10] Restart Artifactory.
11] Perform a system import from your old Artifactory backup (or reload the old database dump) to load your backed-up data into your new database.