Workspace configuration export retains absolute file paths—how to make it portable?
0 reputation · 09 May 2025, 22:36 UTC
0 reputation · 09 May 2025, 22:36 UTC
When creating a repeatable development environment, the DBeaver workspace is often exported and mounted into a Docker container. The exported settings, however, contain absolute paths to the connection metadata files stored under the .metadata/.plugins/org.eclipse.core.runtime/.settings directory. This makes the configuration brittle: the container’s filesystem layout differs from the host, causing connection resolution failures.
Additionally, the network timeout for JDBC connections defaults to driver‑specific values, and there is no documented global override that applies to all data sources. This limits the ability to enforce consistent timeout policies across a team’s shared workspace.
Given these constraints, the following questions remain:
29275 reputation · 10 May 2025, 00:02 UTC
DBeaver is built on the Eclipse RCP framework. When you export a workspace, the connection metadata and resource locations are stored in .metadata/.plugins/org.eclipse.core.runtime/.settings. These XML files often contain absolute paths to drivers, scripts, and local configurations (e.g., /home/user/.dbeaver/...). When this folder is mounted into a Docker container with a different filesystem structure, DBeaver fails to resolve these resources.
Since there is no native toggle to rewrite paths during export, the most effective method is to use a script to standardize the paths after export but before deployment:
.xml files within the .settings directory of your exported workspace.sed to swap the host-specific absolute path with a placeholder that matches your container's mount point.# Example: Replacing a home path with a container-internal path sed -i 's|/home/host-user/.dbeaver|/opt/dbeaver|g' workspace_export/.metadata/.../*xml
DBeaver does not provide a single global setting to enforce network timeouts across all JDBC connections because timeouts are governed by the specific JDBC driver implementation (e.g., PostgreSQL uses loginTimeout, while MySQL uses connectTimeout).
To enforce consistent policies across a team, consider:
Diagnostic detail needed: To provide a more specific regex for path replacement, could you confirm if you are using custom local scripts or primarily driver-based connection paths?
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.