Artifactory version 6.x to 7.x Linux Archive Upgrade

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. 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
    ./artifactoryctl stop
  2. Extract the contents of the compressed archive and move it into artifactory directory.

    tar -xvf jfrog-artifactory-<pro|oss|cpp-ce>-<version>-linux.tar.gz
    mkdir jfrog
    mv artifactory-<pro|oss|cpp-ce>-<version> jfrog/artifactory
  3. Set your ARTIFACTORY_HOME and JFROG_HOME variables.

    export ARTIFACTORY_HOME=<Path to your current Artifactory installation>
    export JFROG_HOME=<Full path to jfrog directory, for example: /opt/jfrog>
    export JF_PRODUCT_HOME=$JFROG_HOME/artifactory

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

  4. Copy the directories from your current to the new path.

    Mandatory Directories

    # Artifactory data
    mkdir -p $JFROG_HOME/artifactory/var/data/artifactory/
    cp -rp $ARTIFACTORY_HOME/data/. $JFROG_HOME/artifactory/var/data/artifactory/
     
    # Access data
    mkdir -p $JFROG_HOME/artifactory/var/data/access/
    cp -rp $ARTIFACTORY_HOME/access/data/. $JFROG_HOME/artifactory/var/data/access/
     
     
    # Artifactory config
    mkdir -p $JFROG_HOME/artifactory/var/etc/artifactory/
    cp -rp $ARTIFACTORY_HOME/etc/. $JFROG_HOME/artifactory/var/etc/artifactory/
     
    # Access config
    mkdir -p $JFROG_HOME/artifactory/var/etc/access/
    cp -rp $ARTIFACTORY_HOME/access/etc/. $JFROG_HOME/artifactory/var/etc/access/
      
    # master.key
    mkdir -p $JFROG_HOME/artifactory/var/etc/security/
    cp -p $ARTIFACTORY_HOME/etc/security/master.key $JFROG_HOME/artifactory/var/etc/security/master.key
     
    # server.xml
    mkdir -p $JFROG_HOME/artifactory/var/work/old
    cp -p $ARTIFACTORY_HOME/tomcat/conf/server.xml $JFROG_HOME/artifactory/var/work/old/server.xml
     
    # artifactory.defaults
    cp -rp $ARTIFACTORY_HOME/bin/artifactory.default $JFROG_HOME/artifactory/var/work/old/artifactory.default
    #or, if Artifactory was installed a service
    cp -rp $ARTIFACTORY_HOME/etc/default $JFROG_HOME/artifactory/var/work/old/artifactory.default
     
    # External database driver, for example: mysql-connector-java-<version>.jar
    mkdir -p $JFROG_HOME/artifactory/var/bootstrap/artifactory/tomcat/lib
    cp -rp $ARTIFACTORY_HOME/tomcat/lib/<your database driver> $JFROG_HOME/artifactory/var/bootstrap/artifactory/tomcat/lib/<your database driver>
     
    # Remove logback.xml with old links. Please consider migrating manually anything that is customized here
    rm -f $JFROG_HOME/artifactory/var/etc/artifactory/logback.xml
    rm -f $JFROG_HOME/artifactory/var/etc/access/logback.xml
     
    # Move Artifactory logs
    mkdir -p $JFROG_HOME/artifactory/var/log/archived/artifactory/
    cp -rp $ARTIFACTORY_HOME/logs/. $JFROG_HOME/artifactory/var/log/archived/artifactory/
     
    # Move configuration files
    # Note: Run the following only when upgrading from Artifactory version 6.x to version 7.5.x and above.
    mkdir -p $JFROG_HOME/artifactory/var/etc/artifactory/old
    mkdir -p $JFROG_HOME/artifactory/var/etc/access/old
    cp $JFROG_HOME/artifactory/var/etc/artifactory/db.properties  $JFROG_HOME/artifactory/var/etc/artifactory/old/db.properties
    cp $JFROG_HOME/artifactory/var/etc/artifactory/ha-node.properties  $JFROG_HOME/artifactory/var/etc/artifactory/old/ha-node.properties
    cp $JFROG_HOME/artifactory/var/etc/access/db.properties   $JFROG_HOME/artifactory/var/etc/access/old/db.properties
    

    Additional directories for HA

    Replace any relative paths in the$ARTIFACTORY_HOME/etc/ha-node.propertiesfile with absolute paths.

    # relative path
    artifactory.ha.data.dir=artifactory-ha
    # absolute path
    artifactory.ha.data.dir=/var/opt/jfrog/artifactory-ha

    Optional Steps

    # Artifactory backup (optional)
    mkdir -p $JFROG_HOME/artifactory/var/backup/artifactory/
    cp -rp $ARTIFACTORY_HOME/backup/. $JFROG_HOME/artifactory/var/backup/artifactory/
     
    # Access backup (optional)
    mkdir -p $JFROG_HOME/artifactory/var/backup/access/
    cp -rp $ARTIFACTORY_HOME/access/data/. $JFROG_HOME/artifactory/var/backup/access/
    
    # Access logs (optional)
    mkdir -p $JFROG_HOME/artifactory/var/log/archived/access/
    cp -rp $ARTIFACTORY_HOME/access/logs/. $JFROG_HOME/artifactory/var/log/archived/access/
    

    Warning

    When you upgrade Artifactory using Linux Archive, verify that the copied directories and the copied content have the right owners.

    If you are using the default user:group, the owner is automatically assigned artifactory:artifactory, and you need need take any further actions (the upgrade will use these by default).

    If, however, you are using a custom user:group, you need to go the Artifactory system.yaml file and update it with the custom user:group. You then need to make sure that the directory has the same user and group.

  5. Run the migration script with the same privileges as you have in your current Artifactory installation.

    The script copies 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.sh

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

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

    migration.log: $JFROG_HOME/artifactory/var/log/migration.log

    system.yaml: $JFROG_HOME/artifactory/var/etc/system.yaml This newly created file contains your current custom configurations in the new format.

  7. If Artifactory was installed as a service in previous version, install this version also as a service.

    cd $JFROG_HOME/artifactory/app/bin
    ./installService.sh

    Otherwise, a restart of the server may lead to older version of Artifactory coming up.

  8. Manage Artifactory.

    $JFROG_HOME/artifactory/app/bin/artifactoryctl start|stop|check
  9. 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

  10. Check Artifactory Log.

    tail -f $JFROG_HOME/artifactory/var/log/console.log

    Configure log rotation of the console log

    The console.log file can grow quickly since all services write to it. For more information, see configure the log rotation.Configuring Log Rotation for Tomcat