- Login as root user
- >su - postgres
- >pg_dump -U username -W -Z 9 -f /tmp/dump_username.dump.zip -h 127.0.0.1 dbname
- >password
To restore, execute:
Other ways: - >psql -U username -f dump_username.dump dbname
>pg_dump -U <username> -W -Z 9 -f /outfile.dump.zip -h 127.0.0.1 <dbname>
><password>
//to restore
>psql -U <username> -f <infile> <dbname>
0 nhận xét:
Đăng nhận xét