PostgreSQL database backup

How can I backup the contents of the PostgreSQL database?

The data in the database is not safe when it is only stored on cloud servers. For me to truly have my data, I need to save current database contents on my PC, like how ‘Download a zip’ can backup the files in repl contents.

I rarely use this database but I think you can download it using the API or something. I may be wrong, but you should still google it up.