# SchemaSPY: Dump & Visualize PG Schema

> Dump & visualize PostgreSQL schema with SchemaSPY
---

Use the following `docker` command to generate a database schema report, using CMDB as an example:

```bash
docker run -v /www/schema/pg-meta/meta/pigsty:/output andrewjones/schemaspy-postgres:latest -host 10.10.10.10 -port 5432 -u dbuser_dba -p DBUser.DBA -db meta -s pigsty
```

Then visit [http://h.pigsty/schema/pg-meta/meta/pigsty](http://h.pigsty/schema/pg-meta/meta/pigsty) to access the schema report.
