Relevant Version: 6.X and below

How to restore a backup in case of an upgrade failure (6.X)

AuthorFullName__c
Patrick Russell
articleNumber
000004266
ft:sourceType
Salesforce
FirstPublishedDate
2018-11-28T22:34:42Z
lastModifiedDate
2024-03-10T07:47:59Z
VersionNumber
7

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.xml
8] 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.