Rolling back an Artifactory upgrade requires reinstalling Artifactory and loading a backup into it.
If an Artifactory upgrade has failed in a production environment, and the JFrog Support Team is unable to assist with restoring the upgrade, a rollback may be necessary.
Artifactory makes permanent, non-reversable changes to its linked database. This means that the only way to get the original Artifactory configuration is to reload a backup.
1. Perform a System Export of the Artifactory or take a database dump of the external database
2. Preserve the Artifactory data directory (By default found under /var/opt/jfrog/artifactory/data)
3. Back up the /etc/opt/jfrog/artifactory folder to a secure location:
zip -r ~/artifactory-etc.zip /etc/opt/jfrog/artifactory #zips the artifactory etc recursively
4. Shut down the Artifactory service:
systemctl stop artifactory
5. Search for the Artifactory RPM installation and remove it:
rpm -qa | grep artifactory
rpm -e <Artifactory-version>
6. Remove the 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
7. Download and install the old Artifactory version:
rpm -i <ART>.rpm
8. Start the Artifactory service and check to see if it 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) ###
9. Add the Artifactory license back to Artifactory in the Web UI
10. Restore the following files from your backed up etc directory:
11. You will need a new empty database to restore to, configure the new $ART_HOME/etc/db.properties file to connect to it
12. Restore the Artifactory data to the same location as before
13. Restart Artifactory
14. Perform a system import from the old Artifactory backup or reload the database dump into the new database