Manage the .und database (size, backup, move, recover)¶
What the .und is¶
An Understand project is a .und folder (a bundle, not a single file). It holds two very different
kinds of data:
- Project definition — the file list, settings, includes, macros, filters, named roots, and architectures. Small, and the part worth keeping in version control.
- Parsed analysis data — everything Understand extracted from your source. This is the large part, and it can always be regenerated from source by re-analyzing.
(This is different from the hidden .und config folder you can commit inside a source tree to
share CodeCheck configs and scripts — see
Share configuration via the hidden .und folder.)
Where the analysis data lives (and disk footprint)¶
By default the bulky parsed data is stored in your user AppData area, outside the .und folder.
That keeps the .und folder itself small — small enough to commit to version control.
If you enable Store analysis data in project folder when creating the project — or create it from
the command line with und create -db myProject.und -local — the parsed data is stored inside the
.und folder (in a local/ subfolder) instead. The whole project becomes self-contained and movable
to another machine, at the cost of a much larger footprint. Analysis data grows with the size of your
codebase, so expect it to be large for big projects. See
Run Understand from the command line for more on und.
Shrink it for backup or sharing: und purge¶
und purge myProject.und
und purge removes all parsed data, leaving only the project definition, and significantly shrinks
the .und. This is ideal for backing up or sharing a project. Re-run analysis to repopulate it:
und analyze myProject.und
The database must be closed (not open in the GUI) to purge it.
Commit to version control¶
Commit the purged .und (project definition only). Teammates clone it and run
und analyze to build
their own analysis data locally. Because the parsed data is regenerated on each machine, everyone works
from the same settings, filters, and standards without committing gigabytes of analysis output.
Move it to another machine¶
Because a project can reference absolute paths (source, libraries, system/compiler headers), moving it works best when those paths match or are expressed as Named Roots. Create the project with the portability option, or add Named Roots afterward. See Fix broken paths in a portable project.
Recover a corrupted database¶
If Understand reports the parse data is corrupted or won't open, the analysis data is regenerable — you don't lose your project definition:
- Close the project.
- Run
und purge myProject.undto clear the parsed data. - Run
und analyze myProject.und(or Analyze All Files in the GUI) to rebuild it from source.
If the project still won't open after that, recreate it with the New Project Wizard pointing at the same source.