Backup database Including data pg_dump -h localhost -p 5432 -U postgres -W postgres > dump_2024-01-01.sql Schema only pg_dump -h localhost -p 5432 -U postgres -W -s postgres > schema.sql