For example, there is a postgres user, base and trust access.
To save a database cluster:
pg_dumpall -U postgres -w > backup
To restore a database cluster:
psql -U postgres -w -f backup postgres
Backup base:
pg_dump -v -h 127.0.0.0 -F c -U postgres -W -f "base.backup" base
Source: https://ru.stackoverflow.com/questions/3/More articles:How can I replace a word in files in Ubuntu from a terminal?Where to store the state of the Chrome extension?How to remove Flash in Chrome without using extensions?How is the `elf` object file in Linux?How to set periodic script execution on Ubuntu? [duplicate]All Articles