Dump Example
The dump example shows how to export the full contents of a database in a diff-able HTML format using the dump command. This is useful for comparing database states over time or across environments.
How to Run
Before running this example, complete the setup in Getting Started.
- Run the command:
schemacrawler \
--server postgresql \
--host postgresql \
--database schemacrawler \
--user schemacrawler \
--password schemacrawler \
--info-level standard \
--command dump \
--output-format=html \
--output-file share/dump.html
Replace with the connection options for your chosen database. See Getting Started.
The output file will appear in your current working directory on the host and contain the full database contents in a structured, diff-friendly HTML format.
How to Experiment
-
Use grep options to restrict the output to specific tables. For example, to include only tables with columns matching
author, add the following option ---grep-columns=.*\.author.* -
Change the
--info-leveltodetailedormaximumto include more schema metadata alongside the data. - Open the output HTML file in a browser or diff it against another run to see what changed in the database.