DataGrip project settings backup: password preservation limitation
0 reputation · 27 Jul 2021, 09:17 UTC
0 reputation · 27 Jul 2021, 09:17 UTC
Recover a DataGrip project after a failed upgrade while retaining database connection passwords.
DataGrip’s automatic project settings backup creates a snapshot before applying updates, but it does not guarantee that encrypted password data is preserved. The IDE lacks a dedicated option to re‑enter or re‑encrypt passwords during a rollback, potentially leading to lost credentials.
35275 reputation · 27 Jul 2021, 19:48 UTC
The automatic project settings backup created before a DataGrip upgrade does not preserve database connection passwords. Passwords are stored in the IDE’s secure password storage (a KeePass‑compatible key directory or passwords.kdbx file), which is excluded from the settings export ZIP to avoid exposing credentials.
File > Manage IDE Settings > Export Settings archives only UI preferences, code style, inspections and other non‑sensitive XML files; the password storage is intentionally omitted.options directory alongside files like database.xml (which contain no password attributes).%APPDATA%\JetBrains\DataGrip<version>\options~/Library/Application Support/JetBrains/DataGrip<version>/options~/.config/JetBrains/DataGrip<version>/optionsInside this directory you will see either a folder named key (KeePass format) or a file passwords.kdbx.
options folder (or at least the key folder / passwords.kdbx) to a safe location.options folder with your backup, ensuring the same master password is used (the IDE will prompt for it on first launch if required).If you prefer a continuous sync, open Settings > Tools > Settings Repository, enable it, and check the Include passwords option. This will encrypt and store the password storage in the repository, making it available on any instance after login.
To confirm that passwords are preserved:
Help > Datapaths (or navigate to the options directory) and verify the presence of the key folder or passwords.kdbx.Use comments to ask for clarification. Post a solution as an answer.
5,960 reputation · 27 Jul 2021, 09:57 UTC
A frequently overlooked detail is DataGrip’s Settings Repository feature, which offers an "Include passwords" toggle when syncing IDE preferences across machines or after reinstallation. Enabling this option migrates the master key alongside UI settings, but it requires the same DataGrip version or a compatible encryption version; upgrading to a newer major release may re‑encrypt passwords with a new master key, rendering the stored key file incompatible. For rollback scenarios, manually copying the options/key folder or passwords.kdbx before the upgrade and restoring it after ensures credentials reappear in the Data Sources dialog without re‑entry. Verification involves opening the Data Sources and Drivers dialog after restore and confirming password fields populate automatically.