Today, a pgsql backup restore, almost no success, used to take for granted, did not seriously think behind the things, nor the process of the doubt to record, so there is no impression, common often new, this time since the meeting on the summary.
Before the operation of the Pgsql database is mostly with the Navicat tool, but the first two with its backup to restore a library spent 1 hours not good, data transmission is always a variety of problems, later with the field of pgAdmin3 tools, backup restore a few minutes, and simple error-prone. But with pgAdmin3 always have a question, backup is the data format options are as follows: where the custom and tar format can be restored with the recovery command Pg_restore, the directory format is text, can not be directly restored with the PgAdmin3 tool, you need to use the Psql command. General normal situation with custom on the line, simple backup of a database comparison test, select Custom and directory format backup file smaller than 30 m, choose tar and unformatted backup size after 200M a little more, so generally in the default custom format back up the line. If there is an empty selection in the format, manually select the custom format, otherwise it seems that the backup is a text type and cannot be restored directly with the pgAdmin3 command.
Recovering with pgAdmin3 is also simple, as long as it is a custom or tar format that was previously backed up, create a new empty database, and then restore the backup file you selected earlier. It is best to rename the original old database to save.
Originally wanted to learn the deep-seated principle, did not find the relevant information, or first read the reference manual, and finally share a manual:
Http://pan.baidu.com/s/1mgGebEw#list/path=%2Fpgdoccn-releases
Pgsql database backup Restore record