Instructions to configure and move to another database

How to move from the derby database to any external database in Unified platform (Artifactory7.x)without losing data

AuthorFullName__c
Gajapathi Kimidi
articleNumber
000004875
ft:sourceType
Salesforce
FirstPublishedDate
2020-11-16T10:39:54Z
lastModifiedDate
2020-11-16
VersionNumber
5

1. Make sure all the background tasks configured (If any) are disabled.
2. System Export from the currently running instance by opening from Artifactory UI -> Administration -> Artifactory -> Import & Export -> System. Select the Exclude Content checkbox. By selecting this, we export only the configurations from Artifactory but not the binary data.
Note: When we perform a System Export, we export configurations and database entries from database too (irrespective of the type of the database) which we can later import to another database. 
3. Perform a graceful shutdown of the Artifactory. 
4. In order to configure external database (It can be on the same server or can be on a different server), create a database and give the right permissions where Artifactory server can establish a connection, as per this confluence page
Below is an example for Postgres

CREATE USER artifactory WITH PASSWORD 'password';
CREATE DATABASE artifactory WITH OWNER=artifactory ENCODING='UTF8';
GRANT ALL PRIVILEGES ON DATABASE artifactory TO artifactory;
5. SSH to Artifactory server and navigate to the path $JFROG_HOME/var/etc/ and edit the system.yaml file to configure the new database details. 
You may refer $JFROG_HOME/var/etc/system.full-template.yaml file for the samples for each database.
Below is an example snippet for Postgres database
shared:
  database:
    type: postgresql
    driver: org.postgresql.Driver
    url: jdbc:postgresql://<your db url, for example: localhost:5432>/artifactory
    username: artifactory
    password: password

6. Download the JDBC driver corresponding to your database type. Place the appropriate JDBC driver under $JFROG_HOME/artifactory/var/bootstrap/artifactory/tomcat/lib directory and execute the below command to give right permissions. 
$ chmod +r <your driver> 
7. Start Artifactory. 
8. Once the Artifactory is up and running, System Import from the directory which you have exported before. 
Once the import is successful, Artifactory must now be running on the configured external database.
9. Restart Artifactory. 


Note: This process is the same for moving from one database to another database. Refer to this confluence page to see which databases are supported for Artifactory in Unified Platform.