Artifactory version 6.x to 7.x upgrade in Windows

JFrog Installation & Setup Documentation

Content Type
Installation & Setup

Before you proceed, see System Requirements for information on supported platforms, supported browsers, and other requirements.

Migration is a manual process for a Windows installation. The following steps also include copying directories over and running the migration script.

Make sure to run all commands on the server with the user that runs Artifactory.

  1. Stop the current server.

    cd %ARTIFACTORY_HOME%\bin
    artifactory.bat stop

    If you are running the Artifactory service as a process, stop the service from Services. Press the Windows key +R and enter services.msc to access Services.

  2. Extract the contents of the compressed archive, move it into a newly created jfrog\artifactory folder, and go to the new folder.

    Make sure to run all commands on the server with the user that runs Artifactory.

  3. Set your ARTIFACTORY_HOME and JFROG_HOME variables.

    SET ARTIFACTORY_HOME=<Path to your current Artifactory installation>
    SET JFROG_HOME=<Path to jfrog folder>
    SET JF_PRODUCT_HOME=%JFROG_HOME%/artifactory

    The $ARTIFACTORY_HOME variable points to your existing installation, and the $JFROG_HOME variable points to the new installation.

    When you set the ARTIFACTORY_HOME and JFROG_HOME variables, make sure to use Windows short name or escape space. For more information, see here.

  4. Copy the directories from your current to the new path. Ignore if the target directory exists.

    Mandatory Steps
    # Artifactory data
     
    mkdir %JFROG_HOME%\artifactory\var\data\artifactory
    xcopy %ARTIFACTORY_HOME%\data %JFROG_HOME%\artifactory\var\data\artifactory /E /q
      
    # Access data
    mkdir %JFROG_HOME%\artifactory\var\data\access
    xcopy %ARTIFACTORY_HOME%\access\data %JFROG_HOME%\artifactory\var\data\access /E /q
       
    # Artifactory config
    mkdir %JFROG_HOME%\artifactory\var\etc\artifactory
    xcopy %ARTIFACTORY_HOME%\etc %JFROG_HOME%\artifactory\var\etc\artifactory /E /q
      
    # Access config
    mkdir %JFROG_HOME%\artifactory\var\etc\access
    xcopy %ARTIFACTORY_HOME%\access\etc %JFROG_HOME%\artifactory\var\etc\access /E /q
       
    # master.key
    mkdir %JFROG_HOME%\artifactory\var\etc\security
    xcopy %ARTIFACTORY_HOME%\etc\security\master.key %JFROG_HOME%\artifactory\var\etc\security /q
      
    # server.xml
    mkdir %JFROG_HOME%\artifactory\var\work\old
    xcopy %ARTIFACTORY_HOME%\tomcat\conf\server.xml %JFROG_HOME%\artifactory\var\work\old /q
      
    # External database driver, for example: mysql-connector-java-<version>.jar
    xcopy %ARTIFACTORY_HOME%\tomcat\lib\<your database driver> %JFROG_HOME%\artifactory\app\artifactory\tomcat\lib /q
     
    # Change ownership of new Artifactory directory to the user intended to run Artifactory.
    # This can be skipped if you performed all previous steps with the user intended to run Artifactory.
     
    # Remove logback.xml with old links. Please consider migrating manually anything that is customized here
    del %JFROG_HOME%\artifactory\var\etc\artifactory\logback.xml
    del %JFROG_HOME%\artifactory\var\etc\access\logback.xml
     
    # Move configuration files
    # Note: Run the following only when upgrading from Artifactory version 6.x to version 7.5.x and above.
    mkdir %JFROG_HOME%\artifactory\var\etc\artifactory\old
    mkdir %JFROG_HOME%\artifactory\var\etc\access\old
     
    move /Y %JFROG_HOME%\artifactory\var\etc\artifactory\db.properties %JFROG_HOME%\artifactory\var\etc\artifactory\old\db.properties
    move /Y %JFROG_HOME%\artifactory\var\etc\artifactory\ha-node.properties %JFROG_HOME%\artifactory\var\etc\artifactory\old\ha-node.properties
    move /Y %JFROG_HOME%\artifactory\var\etc\access\db.properties  %JFROG_HOME%\artifactory\var\etc\access\old\db.properties
    
    Optional Steps
    # Artifactory backup (optional)
     
    mkdir %JFROG_HOME%\artifactory\var\backup\artifactory
    xcopy %ARTIFACTORY_HOME%\backup %JFROG_HOME%\artifactory\var\backup\artifactory /E /q
      
    # Access backup (optional)
    mkdir %JFROG_HOME%\artifactory\var\backup\access
    xcopy %ARTIFACTORY_HOME%\access\backup %JFROG_HOME%\artifactory\var\backup\access /E /q
      
    # Artifactory logs (optional)
    mkdir %JFROG_HOME%\artifactory\var\log\artifactory
    xcopy %ARTIFACTORY_HOME%\logs %JFROG_HOME%\artifactory\var\log\artifactory /E /q
      
    # Access logs (optional)
    mkdir %JFROG_HOME%\artifactory\var\log\access
    xcopy %ARTIFACTORY_HOME%\access\logs %JFROG_HOME%\artifactory\var\log\access /E /q
      
    # Copy specific files from your current to the new path.
  5. For HA installations, replace any relative paths in the %ARTIFACTORY_HOME%\etc\ha-node.properties file with absolute paths.

    # relative path
    artifactory.ha.data.dir=artifactory-ha
    # absolute path
    artifactory.ha.data.dir=\var\opt\jfrog\artifactory-ha
  6. Run the migration script with the same privileges as you have in your current Artifactory installation. This script will copy over and translate your current configurations to the new configuration format, according to the new file system layout.

    cd %JFROG_HOME%\artifactory\app\bin
    migrate.bat

    Warning

    The migration script only migrates configuration values. Any comments added to the configuration files in the Artifactory 6.x installation will not be migrated.

  7. Check that the migration has completed successfully, by reviewing the following files.

    1. migration log: %JFROG_HOME%\artifactory\var\log\migration.log

    2. system.yaml configuration: %JFROG_HOME%\artifactory\var\etc\system.yaml

      This newly created file will contain your current custom configurations in the new format.

  8. Manage Artifactory.

    %JFROG_HOME%\artifactory\app\bin\artifactory.bat start|stop

    Note

    When you start Artifactory, you may get some firewall exception messages. Select private networks and allow access to continue working.

  9. To install Artifactory as a Windows service, follow the steps here.

  10. Access Artifactory from your browser at: http://SERVER_HOSTNAME:8082/ui/.

    For example, on your local machine: http://localhost:8082/ui/

    Reverse Proxy Settings

    If you had a reverse proxy or load balancer configured with your Artifactory 6.x, you will need to create a new reverse proxy configuration and update your reverse proxy settings.

    You can generate a new configuration template by accessing the upgraded Artifactory server UI (by default http://localhost:8082/ui/), navigate to

    Navigate to Administration > Artifactory > General > HTTP Settings to adjust your Reverse Proxy Settings and generate a new configuration template. See Reverse Proxy Settings.HTTP Settings

  11. Check the artifactory-service.log.

    type %JFROG_HOME%\artifactory\var\log\artifactory-service.log

Artifactory version 7.25.5 onwards includes OpenJDK version 11.0.11 and later. TLS 1.0 and TLS 1.1 are disabled by default from OpenJDK 11.0.11 onwards. If your database version does not support TLS 1.2, the Artifactory startup fails.

If you are unable to upgrade your database to a version that supports TLS 1.2 or later, perform the following steps to run Artifactory:

  1. Download the java.security file that has TLS 1.0 and 1.1 enabled.

  2. Create the directory, ${JFROG_HOME}/artifactory/var/bootstrap/artifactory/java.

    mkdir -p ${JFROG_HOME}/artifactory/var/bootstrap/artifactory/java
  3. Copy the java.security file into ${JFROG_HOME}/artifactory/var/bootstrap/artifactory/java.

  4. Provide the appropriate permissions to the directory.

    chmod 755 ${JFROG_HOME}/artifactory/var/bootstrap/artifactory/java/java.security

    Artifactory startup takes a backup of the existing java.security file and bootstraps custom java.security into the ${JFROG_HOME}/artifactory/app/third-party/java/conf/security folder.