Artifactory Migration using Basic Import Export Method
Artifactory Migration using Basic Import Export Method
TipThis is one of many methods for migrating JFrog Artifactory. For a complete understanding of the overall migration process, we recommend reviewing our main article: Comprehensive Guide to Migrating JFrog Artifactory
IntroductionThis article details the process to perform a basic migration of Artifactory. The method uses Artifactory's built-in functionality to export the entire instance (configuration, metadata, and binaries) into a single package and then imports it into the target instance.
Decision table
Advantages
|
Disadvantage
|
Best For
|
Easy to understand and execute Uses built-in Artifactory features |
Requires Downtime
Unsuitable for large instances
Resource intensive
|
Small instances (< 100,000 artifacts)
Test or Development
|
TermsSource server: The Server which we will export from. This server we would like to “mirror” to another one. Target Server: The server which we will import the configuration to, and will be the exact replica of the Source Server.
Prerequisite Steps It is required to provision a Target Artifactory instance as follows:
Step 1: Install Artifactory
Install the exact same version of Artifactory that's running on your Source server on the Target server (It may be a different install type). Do not start the Artifactory service yet.Step 2: Copy The Master Key
- Navigate to $JFROG_HOME/artifactory/var/etc/
- Create a security folder if it doesn't already exist
- Inside the security folder, create a file named master.key if it doesn't exist
- Copy the master key content from your Source server located at: $JFROG_HOME/artifactory/var/etc/security/master.key
- Set appropriate file permissions so the user running Artifactory has full access to the master.key file:
chown -R artifactory:artifactory $JFROG_HOME/artifactory/var/etc/security/
Note
Copying the $JFROG_HOME/artifactory/var/etc/security/master.key is a critical step in the import process - for both single node and HA imports. The master.key is an AES secret key (128 or 256 bit) that is used by Artifactory for encrypting and decrypting the shared data in the database and is, therefore, required for the import process.
Step 3: Configure System Settings- Configure the system.yaml file with your desired settings, including the database connection details
Location: $JFROG_HOME/artifactory/var/etc/system.yaml - Verify that binarystore.xml is configured according to your requirements.
Step 4: Start and Validate- Start the Artifactory service
- Insert your Artifactory license
- Confirm that Artifactory starts successfully and is functioning properly
Export Process - Block the source server from receiving requests. This is to prevent data delta from forming during the rest of this process. For more information, see the Comprehensive Guide to Migrating JFrog Artifactory.
This can be achieved by creating a firewall, redirecting the LB or reverse proxy that points here or through any other method you prefer. Do not turn off the instance at this stage, we still need it.
For testing purposes, we recommend you run through this process without performing this step and only
Perform this step during your actual migration. - Login to the Source server Artifactory UI
- Perform system export with the "Output Verbose Log" checkbox selected. If you have Mission Control (E+ only), please select this also:
The export generates a folder named with a timestamp format yyyymmdd.hhmmss (for example: 20250526.143022).
This operation will export the Artifacts (Metadata) and their corresponding binaries.
4. Validate that the Export completed successfully via the artifactory-import-export.log generated in the Artifactory log directory.
5. Look for “Full system export completed successfully.”
Transfer the exported directory (using your preferred method) from the Source Artifactory to the Target Artifactory.Tip
You can upload the exported folder after zipping it to your local Artifactory and pull it from there to the Target Artifactory.
6. Once copied to the Target server, grant the user running Artifactory on that server full permissions on that folder.
Import process- Login to the Target server Artifactory UI
- Perform a system Import, select “Output Verbose Log” and Mission Control (E+ only) if you have it:
3. Monitor the system import process completion via the artifactory-import-export.log in the log directory.Look for ### Full system import finished ### 4. Allow some time for Artifactory to import the settings before logging to the UI.NoteKeep in mind that the login credentials are taken from the export, and they might differ from the original credentials set on the Target server. Login to the UI and validate the Target server integrity by downloading and uploading an Artifact and checking the expected artifacts, users and packages are present. 5. Login to the UI and validate the Target server integrity by downloading and uploading an Artifact and checking the expected artifacts, users and packages are present.
Go LiveSwitch the reference in your network from the Source Server to the Target Server Artifactory.SummaryThis article covers performing a migration using the import export method. This method is suitable for small instances. We have many other migration options available, together with additional information here: Comprehensive Guide to Migrating JFrog Artifactory