Dump all databases into a custom-format archive file with moderate compression

pg_dumpall

  • Extract a PostgreSQL database cluster into a script file or other archive file.
    More information: <https://www.postgresql.org/docs/current/app-pg-dumpall.html>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

pg_dumpall -Fc > {{output_file.dump}}

click the source code to copy install pg_dumpall on any operating system with command-not-found.com