Using pg_dump is relatively straightforward. Here is a basic command to back up a database: pg_dump -U [username] -h [host] -p [port] -d [database_name] -F c -b -v -f [filename] In this command:
-U specifies the username. -h specifies the host. -p specifies the port. -d specifies the database_name. -F c specifies the format (custom). -b includes large objects. -v enables verbose mode. -f specifies the output filename.