When moving a CodeScene On-Prem instance from one physical machine to another, it’s crucial to understand how data paths are managed to ensure a smooth migration. This article outlines key considerations and specific database tables or paths to verify during the process.
Ideal Case: Same Paths
If the directory structure and absolute paths remain the same on the new machine - and you've copied over the database and stored analysis data - then everything should typically work out of the box. CodeScene references many internal resources using absolute paths, so path consistency is key.
Path Changes Introduce Complexity
When paths do change (for example, if you install CodeScene in a different directory or restructure your storage layout), you’ll need to handle this more carefully. That’s because the database contains hard-coded absolute paths for:
-
Analysis results
-
Repositories (especially local ones)
-
Code coverage reports
-
SSH keys and project configs
At present, CodeScene does not support automated path rewriting when moving from one on-prem setup to another with different paths - unless you're migrating from a standalone JAR setup to Docker, which includes built-in path normalization logic.
Why We Recommend Docker
This is one of the main reasons we strongly recommend using the Docker-based setup for on-prem installations:
-
Internal file paths inside the container are consistent.
-
Migrations become significantly easier.
-
You avoid path mismatch issues across different environments.
Key Paths & Tables to Check
If you’re changing paths or suspect potential mismatches, review and, if needed, manually update the following:
File System Paths (on disk):
-
code_coverage_data/
- if code coverage is configured. -
deltaanalysisresults/
-
errored_analysis_projects/
-
project_analysis_configurations/
-
project_repository_paths/
- critical for projects using local repositories. -
project_groups_ssh_keys/
- if you use project-level SSH keys. analyses
analysis_repository_revisions
Final Notes
-
Always ensure you’ve made a full backup of both the database and the analysis data directories before initiating a move.
-
If you're unsure about how the paths will behave post-migration, testing the setup in a staging environment is highly recommended.
-
When using Docker, mounting the same external volume paths across machines will avoid most of these pitfalls.