How To Backup PostgreSQL Databases on an Ubuntu VPS

PostgreSQL includes a utility called β€œpg_dump” that can be used to dump database information into a file for backup purposes.

pg_dump name_of_database > name_of_backup_file