The default directory where Hub stores data contains the following subdirectories:
Name
Description
hub
Contains the database for the Hub service
internal
May contain other internal product data
When you copy your existing database to a new location, make sure the new location uses the same folder structure that is shown here.
To change the location of your database, follow the specific instructions for your installation type:
Docker
ZIP
As Hub service runs inside a docker container, you can change only the location of the database on the host machine. In this case you need to move the database to a new location, and then specify the new path as parameter of the docker run command.
Move the content of the current database directory (data) to the new directory.
Provide the user 13001:13001 that runs Hub service inside the container with the access permissions to the new database directory. For more details, see Create Directories for Storing Hub Data.
Run the docker container with the new path to the database on the host machine:
docker run -it --name <hub-server-instance>\
-v <path to new data directory>:/opt/hub/data \
-v <path to conf directory>:/opt/hub/conf \
-v <path to logs directory>:/opt/hub/logs \
-v <path to backups directory>:/opt/hub/backups \
-p <port on host>:8080 \
jetbrains/hub:<version>
Hub service starts with the data directory inside the container (/opt/hub/data) mapped to the new database location on the host machine.
The same way you can change location of the conf, logs, backups, and temp directories.
You can use the following procedure to change the database location for a ZIP distribution.
note
All of the commands on this page are for Linux and macOS. For a Windows installation, replace .sh with .bat and use the backslash.
If you move your database to another server, you may also want to change the location where Hub stores logs and temp files.
To change the location of these files, follow the same procedure that is described for changing the database location and execute the following commands in the script file: