I am using Postgres for a django project and I am currently implementing a database backup/restore system that as simple as possible performs a pg_dump when the user clicks
If you're running Postgres 11's (or higher) version of pg_dump then you can take advantage of the new --no-comments flag.
--no-comments