Postgresql DB dump / restore
For some purposes, for example to have backup copies of database we need to create dump of database.
Dump database
To dump database we can use command line utility pg_dump.
To make dump of database haircolors from previous examples, the usage might looks like:
sudo -u postgres pg_dump …