I’ve made this note because I keep forgetting what the utility is called :/

Not very complex tbh, just run pg_dump (should be installed alongside psql in most distros)

E.g pg_dump -f archive.sql